From 24b04089d81ad53e2cb01ecbf3f85bd0592390a0 Mon Sep 17 00:00:00 2001 From: Cameron Micka Date: Mon, 13 May 2019 16:59:14 -0700 Subject: [PATCH 01/96] Adding color variation to frame rate display. --- .../MixedRealityToolkitVisualProfiler.cs | 63 ++++++++++++++++--- 1 file changed, 53 insertions(+), 10 deletions(-) diff --git a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs index b2f0418cc89..2cf9dde1155 100644 --- a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs +++ b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs @@ -96,12 +96,31 @@ 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 differerent 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.8f, color = new Color(255 / 256.0f, 185 / 256.0f, 0 / 256.0f, 1.0f) }, + // Orange + new FrameRateColor() { percentageOfTarget = 0.7f, color = new Color(242 / 256.0f, 80 / 256.0f, 34 / 256.0f, 1.0f) }, + // Grey + new FrameRateColor() { percentageOfTarget = 0.0f, color = new Color(128 / 256.0f, 128 / 256.0f, 128 / 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.")] @@ -277,10 +296,7 @@ private void LateUpdate() 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; + frameInfoColors[0] = CalculateFrameColor(cpuFrameRate); frameInfoPropertyBlock.SetVectorArray(colorID, frameInfoColors); // Reset timers. @@ -393,6 +409,33 @@ 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 BuildWindow() { // Initialize property block state. @@ -426,7 +469,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(); @@ -608,7 +651,7 @@ private static int MemoryItoA(int value, char[] stringBuffer, int bufferIndex) return bufferIndex; } - private static float AppFrameRate + private static float AppTargetFrameRate { get { From b4df743aa306e9825327d74be507ce874598be98 Mon Sep 17 00:00:00 2001 From: Cameron Micka Date: Tue, 14 May 2019 15:25:38 -0700 Subject: [PATCH 02/96] Memory stats toggle. --- .../MixedRealityToolkitVisualProfiler.cs | 65 ++++++++++--------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs index 2cf9dde1155..009157fc173 100644 --- a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs +++ b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs @@ -47,6 +47,9 @@ public bool IsVisible set { isVisible = value; } } + [SerializeField, Tooltip("Should memory stats (used, peak, and limit) be displayed.")] + private bool displayMemoryStats = true; + [SerializeField, Tooltip("The amount of time, in seconds, to collect frames for frame rate calculation.")] private float frameSampleRate = 0.1f; @@ -106,17 +109,15 @@ private struct FrameRateColor public Color color; } - [SerializeField, Tooltip("A list of colors to display for differerent percentage of target frame rates.")] + [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.8f, color = new Color(255 / 256.0f, 185 / 256.0f, 0 / 256.0f, 1.0f) }, - // Orange - new FrameRateColor() { percentageOfTarget = 0.7f, color = new Color(242 / 256.0f, 80 / 256.0f, 34 / 256.0f, 1.0f) }, - // Grey - new FrameRateColor() { percentageOfTarget = 0.0f, color = new Color(128 / 256.0f, 128 / 256.0f, 128 / 256.0f, 1.0f) }, + 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.")] @@ -327,42 +328,45 @@ private void LateUpdate() } // Update memory statistics. - ulong limit = AppMemoryUsageLimit; - - if (limit != limitMemoryUsage) + if (displayMemoryStats && usedMemoryText != null) { - if (window.activeSelf && WillDisplayedMemoryUsageDiffer(limitMemoryUsage, limit, displayedDecimalDigits)) + ulong limit = AppMemoryUsageLimit; + + if (limit != limitMemoryUsage) { - MemoryUsageToString(stringBuffer, displayedDecimalDigits, limitMemoryText, limitMemoryString, limit); + if (window.activeSelf && 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 (window.activeSelf && 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 (window.activeSelf && 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); @@ -477,6 +481,7 @@ private void BuildWindow() } // Add memory usage text and bars. + if (displayMemoryStats) { 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); From c5e8a2a403cddd7b6fd9a79ad4d7e2d37433ec4a Mon Sep 17 00:00:00 2001 From: Cameron Micka Date: Wed, 15 May 2019 09:30:55 -0700 Subject: [PATCH 03/96] Adding ability to enable/disable portions of the visual profiler. --- .../MixedRealityToolkitVisualProfiler.cs | 119 +++++++++++++----- 1 file changed, 88 insertions(+), 31 deletions(-) diff --git a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityToolkitVisualProfiler.cs index 009157fc173..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,8 +49,23 @@ 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 displayMemoryStats = true; + 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; @@ -129,9 +146,11 @@ private struct FrameRateColor [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; @@ -238,7 +257,10 @@ private void Start() private void OnDestroy() { - Destroy(window); + if (window != null) + { + Destroy(window.gameObject); + } } private void LateUpdate() @@ -251,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. @@ -292,13 +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]; + } - frameInfoColors[0] = CalculateFrameColor(cpuFrameRate); - frameInfoPropertyBlock.SetVectorArray(colorID, frameInfoColors); + frameInfoColors[0] = CalculateFrameColor(cpuFrameRate); + frameInfoPropertyBlock.SetVectorArray(colorID, frameInfoColors); + } // Reset timers. frameCount = 0; @@ -307,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) { @@ -328,13 +354,13 @@ private void LateUpdate() } // Update memory statistics. - if (displayMemoryStats && usedMemoryText != null) + if (isVisible && memoryStatsVisible) { ulong limit = AppMemoryUsageLimit; if (limit != limitMemoryUsage) { - if (window.activeSelf && WillDisplayedMemoryUsageDiffer(limitMemoryUsage, limit, displayedDecimalDigits)) + if (WillDisplayedMemoryUsageDiffer(limitMemoryUsage, limit, displayedDecimalDigits)) { MemoryUsageToString(stringBuffer, displayedDecimalDigits, limitMemoryText, limitMemoryString, limit); } @@ -348,7 +374,7 @@ private void LateUpdate() { usedAnchor.localScale = new Vector3((float)usage / limitMemoryUsage, usedAnchor.localScale.y, usedAnchor.localScale.z); - if (window.activeSelf && WillDisplayedMemoryUsageDiffer(memoryUsage, usage, displayedDecimalDigits)) + if (WillDisplayedMemoryUsageDiffer(memoryUsage, usage, displayedDecimalDigits)) { MemoryUsageToString(stringBuffer, displayedDecimalDigits, usedMemoryText, usedMemoryString, usage); } @@ -360,7 +386,7 @@ private void LateUpdate() { peakAnchor.localScale = new Vector3((float)memoryUsage / limitMemoryUsage, peakAnchor.localScale.y, peakAnchor.localScale.z); - if (window.activeSelf && WillDisplayedMemoryUsageDiffer(peakMemoryUsage, memoryUsage, displayedDecimalDigits)) + if (WillDisplayedMemoryUsageDiffer(peakMemoryUsage, memoryUsage, displayedDecimalDigits)) { MemoryUsageToString(stringBuffer, displayedDecimalDigits, peakMemoryText, peakMemoryString, memoryUsage); } @@ -369,7 +395,9 @@ private void LateUpdate() } } - window.SetActive(isVisible); + // Update visibility state. + window.gameObject.SetActive(isVisible); + memoryStats.gameObject.SetActive(memoryStatsVisible); } private Vector3 CalculateWindowPosition(Transform cameraTransform) @@ -440,6 +468,25 @@ private Color CalculateFrameColor(int frameRate) 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. @@ -448,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]; @@ -481,13 +534,16 @@ private void BuildWindow() } // Add memory usage text and bars. - if (displayMemoryStats) { - 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); @@ -510,7 +566,8 @@ private void BuildWindow() } } - window.SetActive(isVisible); + window.gameObject.SetActive(isVisible); + memoryStats.gameObject.SetActive(memoryStatsVisible); } private void BuildFrameRateStrings() From 7af0a8fea3df1586639bd54b6869cd5d3821eeef Mon Sep 17 00:00:00 2001 From: Cameron Micka Date: Wed, 15 May 2019 11:28:50 -0700 Subject: [PATCH 04/96] Adding options to enable/disable frame info and memory stats in the visual profiler. --- ...efaultMixedRealityDiagnosticsProfile.asset | 10 +++- .../MixedRealityDiagnosticsSystem.cs | 50 +++++++++++++++++++ .../MixedRealityDiagnosticsProfile.cs | 30 +++++++++++ ...ealityDiagnosticsSystemProfileInspector.cs | 9 ++++ .../IMixedRealityDiagnosticsSystem.cs | 10 ++++ 5 files changed, 108 insertions(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityDiagnosticsProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityDiagnosticsProfile.asset index c45c6e2b99c..fe24c71b567 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 + defaultInstancedShader: {fileID: 4800000, guid: d199a2ca60343bb49ad9a41ddb45a083, + type: 3} diff --git a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs index f158641d4c9..a88c83b44ee 100644 --- a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs +++ b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs @@ -35,6 +35,8 @@ private void CreateVisualizations() 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; @@ -59,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; @@ -135,6 +139,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/Definitions/Diagnostics/MixedRealityDiagnosticsProfile.cs b/Assets/MixedRealityToolkit/Definitions/Diagnostics/MixedRealityDiagnosticsProfile.cs index 03f27cd16b9..16848635dae 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 shader that the diagnostics system can use to render objects with instanced color support.")] + private Shader defaultInstancedShader = null; + + /// + /// A shader that the diagnostics system can use to render objects with instanced color support. + /// A asset reference is required here to make sure the shader is pulled into player builds. + /// + public Shader DefaultInstancedShader => defaultInstancedShader; + + } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs index 36ad23b01de..f50dda4ad6d 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs @@ -15,11 +15,14 @@ public class MixedRealityDiagnosticsSystemProfileInspector : BaseMixedRealityToo 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 defaultInstancedShader; // todo: coming soon // private static bool showDebugPanelSettings = true; @@ -31,11 +34,14 @@ protected override void OnEnable() 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"); + defaultInstancedShader = serializedObject.FindProperty("defaultInstancedShader"); } public override void OnInspectorGUI() @@ -79,11 +85,14 @@ 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(defaultInstancedShader); } } diff --git a/Assets/MixedRealityToolkit/Interfaces/Diagnostics/IMixedRealityDiagnosticsSystem.cs b/Assets/MixedRealityToolkit/Interfaces/Diagnostics/IMixedRealityDiagnosticsSystem.cs index 882437c75f5..c2b603fb144 100644 --- a/Assets/MixedRealityToolkit/Interfaces/Diagnostics/IMixedRealityDiagnosticsSystem.cs +++ b/Assets/MixedRealityToolkit/Interfaces/Diagnostics/IMixedRealityDiagnosticsSystem.cs @@ -23,6 +23,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. /// From 5e8187ff3533713dc386aa42e4083fd0b1f87c7e Mon Sep 17 00:00:00 2001 From: Will Wei Date: Wed, 15 May 2019 15:35:07 -0700 Subject: [PATCH 05/96] Exception raised in call to InteractionManager.GetCurrentReading() There's an underlying Unity bug where calling InteractionManager:GetCurrentReading when there are no sources trips this asssertion. This change addresses a couple of things: 1) Works around this underlying bug by checking to see if numSourceStates == 0 (if so, don't bother calling that API) 2) As a related but not totally related change, making it so that we now support cases where the number of states is > the value of 20. Note that I didn't change the naming of it because the value is public (and thus, it would be a value-less breaking change). When we detect that our array size is not large enough, we will re-allocate (and in a way that should reduce the number of repeat allocations if the numbers are fluctuating a lot). --- .../WindowsMixedRealityDeviceManager.cs | 53 +++++++++++++++++-- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityDeviceManager.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityDeviceManager.cs index 044ab82f1f4..07daa256c19 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityDeviceManager.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityDeviceManager.cs @@ -42,11 +42,23 @@ public WindowsMixedRealityDeviceManager( #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 /// @@ -287,7 +299,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 @@ -317,7 +329,7 @@ public override void Update() { base.Update(); - numInteractionManagerStates = InteractionManager.GetCurrentReading(interactionmanagerStates); + UpdateInteractionManagerReading(); for (var i = 0; i < numInteractionManagerStates; i++) { @@ -745,6 +757,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 } From e49006dc34861ebf0a026145104a44a9efefdf17 Mon Sep 17 00:00:00 2001 From: Cameron Micka Date: Wed, 15 May 2019 16:32:51 -0700 Subject: [PATCH 06/96] Adding an asset reference for the instanced color material. --- ...efaultMixedRealityDiagnosticsProfile.asset | 4 +- .../DiagnosticsSystem/Materials.meta | 8 + .../Materials/DiagnosticsInstancedColored.mat | 161 ++++++++++++++++++ .../DiagnosticsInstancedColored.mat.meta | 8 + .../MixedRealityDiagnosticsProfile.cs | 10 +- ...ealityDiagnosticsSystemProfileInspector.cs | 6 +- 6 files changed, 187 insertions(+), 10 deletions(-) create mode 100644 Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials.meta create mode 100644 Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat create mode 100644 Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat.meta diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityDiagnosticsProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityDiagnosticsProfile.asset index fe24c71b567..3d100190371 100644 --- a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityDiagnosticsProfile.asset +++ b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealityDiagnosticsProfile.asset @@ -22,5 +22,5 @@ MonoBehaviour: windowOffset: {x: 0.1, y: 0.1} windowScale: 1 windowFollowSpeed: 5 - defaultInstancedShader: {fileID: 4800000, guid: d199a2ca60343bb49ad9a41ddb45a083, - type: 3} + defaultInstancedMaterial: {fileID: 2100000, guid: 5b6fc83077d74fd4ca4c675623942a3e, + type: 2} diff --git a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials.meta b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials.meta new file mode 100644 index 00000000000..7fd16ff4b64 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bcc2aa871ed4de44dab31b3d82287a07 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat new file mode 100644 index 00000000000..774a0a09a49 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat @@ -0,0 +1,161 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: DiagnosticsInstancedColored + m_Shader: {fileID: 4800000, guid: d199a2ca60343bb49ad9a41ddb45a083, type: 3} + m_ShaderKeywords: _DISABLE_ALBEDO_MAP _HOVER_LIGHT + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + 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} + - _IridescentSpectrumMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + 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} + - _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} + m_Floats: + - _AlbedoAlphaMode: 0 + - _AlbedoAssignedAtRuntime: 0 + - _BlendOp: 0 + - _BorderLight: 0 + - _BorderLightOpaque: 0 + - _BorderLightOpaqueAlpha: 1 + - _BorderLightReplacesAlbedo: 0 + - _BorderLightUsesHoverColor: 0 + - _BorderMinValue: 0.1 + - _BorderWidth: 0.1 + - _BumpScale: 1 + - _ClippingBorder: 0 + - _ClippingBorderWidth: 0.025 + - _ClippingBox: 0 + - _ClippingPlane: 0 + - _ClippingSphere: 0 + - _ColorWriteMask: 15 + - _Cull: 0 + - _CullMode: 2 + - _CustomMode: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DirectionalLight: 0 + - _DstBlend: 0 + - _EdgeSmoothingValue: 0.002 + - _EnableChannelMap: 0 + - _EnableEmission: 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 + - _InnerGlow: 0 + - _InnerGlowPower: 4 + - _InstancedColor: 0 + - _Iridescence: 0 + - _IridescenceAngle: -0.78 + - _IridescenceIntensity: 0.5 + - _IridescenceThreshold: 0.05 + - _Metallic: 0 + - _Mode: 0 + - _NearLightFade: 0 + - _NearPlaneFade: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ProximityLight: 0 + - _ProximityLightTwoSided: 0 + - _Reflections: 0 + - _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: 0 + - _SphericalHarmonics: 0 + - _SrcBlend: 1 + - _Stencil: 0 + - _StencilComparison: 0 + - _StencilOperation: 0 + - _StencilReference: 0 + - _TriplanarMappingBlendSharpness: 4 + - _UVSec: 0 + - _VertexColors: 0 + - _ZTest: 4 + - _ZWrite: 1 + m_Colors: + - _ClippingBorderColor: {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} + - _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} diff --git a/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat.meta b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat.meta new file mode 100644 index 00000000000..00e76272c60 --- /dev/null +++ b/Assets/MixedRealityToolkit.Services/DiagnosticsSystem/Materials/DiagnosticsInstancedColored.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5b6fc83077d74fd4ca4c675623942a3e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Definitions/Diagnostics/MixedRealityDiagnosticsProfile.cs b/Assets/MixedRealityToolkit/Definitions/Diagnostics/MixedRealityDiagnosticsProfile.cs index 16848635dae..09e45b3db7a 100644 --- a/Assets/MixedRealityToolkit/Definitions/Diagnostics/MixedRealityDiagnosticsProfile.cs +++ b/Assets/MixedRealityToolkit/Definitions/Diagnostics/MixedRealityDiagnosticsProfile.cs @@ -99,14 +99,14 @@ public class MixedRealityDiagnosticsProfile : BaseMixedRealityProfile public float WindowFollowSpeed => windowFollowSpeed; [SerializeField] - [Tooltip("A shader that the diagnostics system can use to render objects with instanced color support.")] - private Shader defaultInstancedShader = null; + [Tooltip("A material that the diagnostics system can use to render objects with instanced color support.")] + private Material defaultInstancedMaterial = null; /// - /// A shader that the diagnostics system can use to render objects with instanced color support. - /// A asset reference is required here to make sure the shader is pulled into player builds. + /// 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 Shader DefaultInstancedShader => defaultInstancedShader; + public Material DefaultInstancedMaterial => defaultInstancedMaterial; } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs index f50dda4ad6d..117a7a04eab 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs @@ -22,7 +22,7 @@ public class MixedRealityDiagnosticsSystemProfileInspector : BaseMixedRealityToo private SerializedProperty windowOffset; private SerializedProperty windowScale; private SerializedProperty windowFollowSpeed; - private SerializedProperty defaultInstancedShader; + private SerializedProperty defaultInstancedMaterial; // todo: coming soon // private static bool showDebugPanelSettings = true; @@ -41,7 +41,7 @@ protected override void OnEnable() windowOffset = serializedObject.FindProperty("windowOffset"); windowScale = serializedObject.FindProperty("windowScale"); windowFollowSpeed = serializedObject.FindProperty("windowFollowSpeed"); - defaultInstancedShader = serializedObject.FindProperty("defaultInstancedShader"); + defaultInstancedMaterial = serializedObject.FindProperty("defaultInstancedMaterial"); } public override void OnInspectorGUI() @@ -92,7 +92,7 @@ public override void OnInspectorGUI() EditorGUILayout.PropertyField(windowOffset); EditorGUILayout.PropertyField(windowScale); EditorGUILayout.PropertyField(windowFollowSpeed); - EditorGUILayout.PropertyField(defaultInstancedShader); + EditorGUILayout.PropertyField(defaultInstancedMaterial); } } From 5ab4513e4d60934547fc13af679aa1edf663406f Mon Sep 17 00:00:00 2001 From: Will Wei Date: Wed, 15 May 2019 16:53:41 -0700 Subject: [PATCH 07/96] Update the Unity Package build step to accurately named. I think that this step used to build nuget packages as well, until we did the later NuGet work (of packing it up at the end of CI). However, this text appears to have stuck around. Note that the command it runs actually says "NoNuget" --- pipelines/ci.yaml | 2 +- pipelines/pr.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/ci.yaml b/pipelines/ci.yaml index 92602174795..35d97c69220 100644 --- a/pipelines/ci.yaml +++ b/pipelines/ci.yaml @@ -64,7 +64,7 @@ steps: - powershell: | $AutoMrtkVersion = Get-Date -format "dd.MM.yyyy" .\build.ps1 -Version $AutoMrtkVersion -NoNuget - displayName: 'Build Unity and NuGet packages' + displayName: 'Build Unity packages' - powershell: | Get-ChildItem "." -Filter Build-UnityPackage*.log | diff --git a/pipelines/pr.yaml b/pipelines/pr.yaml index c9897b51303..6bf94d57202 100644 --- a/pipelines/pr.yaml +++ b/pipelines/pr.yaml @@ -64,7 +64,7 @@ steps: - powershell: | $AutoMrtkVersion = Get-Date -format "dd.MM.yyyy" .\build.ps1 -Version $AutoMrtkVersion -NoNuget - displayName: 'Build Unity and NuGet packages' + displayName: 'Build Unity packages' - powershell: | Get-ChildItem "." -Filter Build-UnityPackage*.log | From 8841f1e3c4a7abddb0efe953a40d71876a9e5737 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Wed, 15 May 2019 23:54:10 -0700 Subject: [PATCH 08/96] Expose bunch of fields in boundingbox as getters and setters. --- .../UX/Scripts/BoundingBox/BoundingBox.cs | 79 ++++++++++++++++++- 1 file changed, 76 insertions(+), 3 deletions(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index 88b55429575..ae179200f6c 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -20,7 +20,7 @@ public class BoundingBox : BaseFocusHandler, /// /// Enum which describes how an object's boundingbox is to be flattened. /// - private enum FlattenModeType + public enum FlattenModeType { DoNotFlatten = 0, /// @@ -134,19 +134,86 @@ public BoundingBoxActivationType BoundingBoxActivation [SerializeField] [Tooltip("Flatten bounds in the specified axis or flatten the smallest one if 'auto' is selected")] private FlattenModeType flattenAxis = FlattenModeType.DoNotFlatten; + public FlattenModeType FlattenAxis + { + get { return flattenAxis; } + set + { + if (flattenAxis != value) + { + flattenAxis = value; + DestroyRig(); + CreateRig(); + } + } + } [SerializeField] [FormerlySerializedAs("wireframePadding")] [Tooltip("Extra padding added to the actual Target bounds")] private Vector3 boxPadding = Vector3.zero; + public Vector3 BoxPadding + { + get { return boxPadding; } + set + { + if (Vector3.Distance(boxPadding, value) > float.Epsilon) + { + boxPadding = value; + DestroyRig(); + CreateRig(); + } + } + } [SerializeField] [Tooltip("Material used to display the bounding box. If set to null no bounding box will be displayed")] private Material boxMaterial = null; + public Material BoxMaterial + { + get { return boxMaterial; } + set + { + if (boxMaterial != value) + { + boxMaterial = value; + if (boxDisplay != null) + { + ApplyMaterialToAllRenderers(boxDisplay, boxMaterial); + } + else + { + AddBoxDisplay(); + } + } + } + } + [SerializeField] [Tooltip("Material used to display the bounding box when grabbed. If set to null no change will occur when grabbed.")] private Material boxGrabbedMaterial = null; + + public Material BoxGrabbedMaterial + { + get { return boxGrabbedMaterial; } + set { boxGrabbedMaterial = value; } + } + [SerializeField] [Tooltip("Show a wireframe around the bounding box when checked. Wireframe parameters below have no effect unless this is checked")] private bool showWireframe = true; + + public bool ShowWireFrame + { + get { return showWireframe; } + set + { + if (showWireframe != value) + { + showWireframe = value; + ResetHandleVisibility(); + } + } + } + [SerializeField] [Tooltip("Shape used for wireframe display")] private WireframeType wireframeShape = WireframeType.Cubic; @@ -268,6 +335,12 @@ public bool ShowRotationHandleForZ [Tooltip("Check to draw a tether point from the handles to the hand when manipulating.")] private bool drawTetherWhenManipulating = true; + public bool DrawTetherWhenManipulating + { + get { return drawTetherWhenManipulating; } + set { drawTetherWhenManipulating = value; } + } + [Header("Debug")] [Tooltip("Debug only. Component used to display debug messages")] public TextMesh debugText; @@ -573,7 +646,7 @@ private Vector3 GetRotationAxis(Transform handle) private void AddCorners() { bool isFlattened = (flattenAxis != FlattenModeType.DoNotFlatten); - + // Flattened but missing custom 2D handle prefab OR Not flattened but missing custom 3D handle prefab. if ((isFlattened && (scaleHandleSlatePrefab == null)) || (scaleHandlePrefab == null)) { @@ -641,7 +714,7 @@ private void AddCorners() GameObject cornerVisuals = Instantiate(isFlattened ? scaleHandleSlatePrefab : scaleHandlePrefab, visualsScale.transform); cornerVisuals.name = "visuals"; - if(isFlattened) + if (isFlattened) { // Rotate 2D slate handle asset for proper orientation cornerVisuals.transform.Rotate(0, 0, -90); From 1b5b2da2b6d27518bee97fa858135d3b3732db85 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Wed, 15 May 2019 23:59:37 -0700 Subject: [PATCH 09/96] More fieds can be modified via code. --- .../UX/Scripts/BoundingBox/BoundingBox.cs | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index ae179200f6c..2bb72519206 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -60,7 +60,7 @@ private enum HandleType /// Wireframe refers to the thin linkage between the handles. When the handles are invisible /// the wireframe looks like an outline box around an object. /// - private enum WireframeType + public enum WireframeType { Cubic = 0, Cylindrical @@ -217,14 +217,54 @@ public bool ShowWireFrame [SerializeField] [Tooltip("Shape used for wireframe display")] private WireframeType wireframeShape = WireframeType.Cubic; + public WireframeType WireframeShape + { + get { return wireframeShape; } + set + { + if (wireframeShape != value) + { + wireframeShape = value; + DestroyRig(); + CreateRig(); + } + } + } + [SerializeField] [Tooltip("Material used for wireframe display")] private Material wireframeMaterial; + public Material WireframeMaterial + { + get { return wireframeMaterial; } + set + { + if (wireframeMaterial != value) + { + wireframeMaterial = value; + DestroyRig(); + CreateRig(); + } + } + } + [SerializeField] [FormerlySerializedAs("linkRadius")] [Tooltip("Radius for wireframe edges")] private float wireframeEdgeRadius = 0.005f; - + public float WireframeEdgeRadius + { + get { return wireframeEdgeRadius; } + set + { + if (wireframeEdgeRadius != value) + { + wireframeEdgeRadius = value; + DestroyRig(); + CreateRig(); + } + } + } [Header("Handles")] [SerializeField] [Tooltip("Material applied to handles when they are not in a grabbed state")] From 72e63c3e55bae7b2771d25e92c83afd8ab10abda Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 16 May 2019 00:07:20 -0700 Subject: [PATCH 10/96] More private fields exposed as properties --- .../UX/Scripts/BoundingBox/BoundingBox.cs | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index 2bb72519206..c149926814e 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -269,26 +269,126 @@ public float WireframeEdgeRadius [SerializeField] [Tooltip("Material applied to handles when they are not in a grabbed state")] private Material handleMaterial; + public Material HandleMaterial + { + get { return handleMaterial; } + set + { + if (handleMaterial != value) + { + handleMaterial = value; + DestroyRig(); + CreateRig(); + } + } + } + [SerializeField] [Tooltip("Material applied to handles while they are a grabbed")] private Material handleGrabbedMaterial; + + public Material HandleGrabbedMaterial + { + get { return handleGrabbedMaterial; } + set + { + if (handleGrabbedMaterial != value) + { + handleGrabbedMaterial = value; + DestroyRig(); + CreateRig(); + } + } + } + [SerializeField] [Tooltip("Prefab used to display scale handles in corners. If not set, boxes will be displayed instead")] GameObject scaleHandlePrefab = null; + + public GameObject ScaleHandlePrefab + { + get { return scaleHandlePrefab; } + set + { + if (scaleHandlePrefab != value) + { + scaleHandlePrefab = value; + DestroyRig(); + CreateRig(); + } + } + } + [SerializeField] [Tooltip("Prefab used to display scale handles in corners for 2D slate. If not set, boxes will be displayed instead")] GameObject scaleHandleSlatePrefab = null; + + public GameObject ScaleHandleSlatePrefab + { + get { return scaleHandleSlatePrefab; } + set + { + if (scaleHandleSlatePrefab != value) + { + scaleHandleSlatePrefab = value; + DestroyRig(); + CreateRig(); + } + } + } + [SerializeField] [FormerlySerializedAs("cornerRadius")] [Tooltip("Size of the cube collidable used in scale handles")] private float scaleHandleSize = 0.03f; + + public float ScaleHandleSize + { + get { return scaleHandleSize; } + set + { + if (scaleHandleSize != value) + { + scaleHandleSize = value; + DestroyRig(); + CreateRig(); + } + } + } + [SerializeField] [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; + public GameObject RotationHandleSlatePrefab + { + get { return rotationHandlePrefab; } + set + { + if (rotationHandlePrefab != value) + { + rotationHandlePrefab = value; + DestroyRig(); + CreateRig(); + } + } + } [SerializeField] [FormerlySerializedAs("ballRadius")] [Tooltip("Radius of the sphere collidable used in rotation handles")] private float rotationHandleDiameter = 0.035f; + public float RotationHandleDiameter + { + get { return rotationHandleDiameter; } + set + { + if (rotationHandleDiameter != value) + { + rotationHandleDiameter = value; + DestroyRig(); + CreateRig(); + } + } + } [SerializeField] [Tooltip("Check to show scale handles")] From 11b0850a39d9791c9e006aeef81871ef96e753fb Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 16 May 2019 10:15:53 -0700 Subject: [PATCH 11/96] Expose HideElementsInInspector, and add more cases to test setting properties in code in BoundingBox --- .../Demos/UX/BoundingBox.meta | 8 + .../Demos/UX/BoundingBox/Scenes.meta | 8 + .../BoundingBox/Scenes/BoundingBoxTest.unity | 486 ++++++++++++++++++ .../Scenes/BoundingBoxTest.unity.meta | 7 + .../Demos/UX/BoundingBox/Scripts.meta | 8 + .../UX/BoundingBox/Scripts/BoundingBoxTest.cs | 98 ++++ .../Scripts/BoundingBoxTest.cs.meta | 11 + .../UX/Scripts/BoundingBox/BoundingBox.cs | 41 +- 8 files changed, 645 insertions(+), 22 deletions(-) create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox.meta b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox.meta new file mode 100644 index 00000000000..06154786004 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b9ffd776dd4b2e2459eada6d5b4ea244 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes.meta b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes.meta new file mode 100644 index 00000000000..2cbd72ed512 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1eecacd25a9410f4ea0dd8dc32aa29b0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity new file mode 100644 index 00000000000..6f519f70100 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity @@ -0,0 +1,486 @@ +%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 &177802704 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 177802706} + - component: {fileID: 177802705} + m_Layer: 0 + m_Name: TestBBox + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &177802705 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 177802704} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9a76745b0a647f444b850e879efd3576, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &177802706 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 177802704} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.17462003, y: 0.073931515, z: 0.92301} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &342624755 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 342624756} + m_Layer: 0 + m_Name: MixedRealityPlayspace + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &342624756 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 342624755} + 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: 874614039} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &874614036 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 874614039} + - component: {fileID: 874614038} + - component: {fileID: 874614037} + - component: {fileID: 874614042} + - component: {fileID: 874614041} + - component: {fileID: 874614040} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &874614037 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + m_Enabled: 1 +--- !u!20 &874614038 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + 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!4 &874614039 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + 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: 342624756} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &874614040 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + 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 + useEyeTracking: 0 +--- !u!114 &874614041 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + 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 &874614042 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + 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!1 &1631278665 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1631278667} + - component: {fileID: 1631278666} + m_Layer: 0 + m_Name: AsyncCoroutineRunner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1631278666 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1631278665} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8e6ecbbf0b5840b09d7b4ee7f0a62b7a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1631278667 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1631278665} + 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: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1685224230 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1685224232} + - component: {fileID: 1685224231} + 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 &1685224231 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1685224230} + 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 &1685224232 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1685224230} + 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 &2051637124 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2051637126} + - component: {fileID: 2051637125} + m_Layer: 0 + m_Name: MixedRealityToolkit + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2051637125 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2051637124} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 83d9acc7968244a8886f3af591305bcb, type: 3} + m_Name: + m_EditorClassIdentifier: + activeProfile: {fileID: 11400000, guid: 31a611a779d3499e8e35f1a2018ca841, type: 2} +--- !u!4 &2051637126 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2051637124} + 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} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity.meta new file mode 100644 index 00000000000..a74479e36bc --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a7d9284da176d9542af67603dab6088c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts.meta b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts.meta new file mode 100644 index 00000000000..73c09852f20 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f28cc47fc2db974fb354b414c149d78 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs new file mode 100644 index 00000000000..3b467158fee --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -0,0 +1,98 @@ +using Microsoft.MixedReality.Toolkit.Input; +using Microsoft.MixedReality.Toolkit.UI; +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +public class BoundingBoxTest : InputSystemGlobalListener, IMixedRealitySpeechHandler +{ + BoundingBox bbox; + private bool signal; + // Start is called before the first frame update + void Start() + { + base.Start(); + StartCoroutine(Sequence()); + } + + private IEnumerator Sequence() + { + // verify bbox can be created at scale of 1 + var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); + cube.GetComponent().material.color = Color.black; + bbox = cube.AddComponent(); + bbox.HideElementsInInspector = false; + bbox.BoundingBoxActivation = BoundingBox.BoundingBoxActivationType.ActivateOnStart; + var mh = cube.AddComponent(); + + Debug.Log("FlattenX"); + yield return WaitForSpeechCommand(); + bbox.FlattenAxis = BoundingBox.FlattenModeType.FlattenX; + Debug.Log("FlattenY"); + yield return WaitForSpeechCommand(); + bbox.FlattenAxis = BoundingBox.FlattenModeType.FlattenY; + Debug.Log("FlattenNone"); + yield return WaitForSpeechCommand(); + bbox.FlattenAxis = BoundingBox.FlattenModeType.DoNotFlatten; + + Debug.Log("BoxPadding .2"); + yield return WaitForSpeechCommand(); + bbox.BoxPadding = new Vector3(0.2f, 0.2f, 0.2f); + Debug.Log("BoxPadding 0"); + yield return WaitForSpeechCommand(); + bbox.BoxPadding = Vector3.zero; + + Debug.Log("scalehandle widget"); + yield return WaitForSpeechCommand(); + bbox.ScaleHandleSize = 0.03f; + bbox.ScaleHandlePrefab = LoadAsset("MRTK_BoundingBox_ScaleWidget"); + + Debug.Log("handles red"); + yield return WaitForSpeechCommand(); + bbox.HandleMaterial = LoadAsset("MRTK_Standard_Red"); + + Debug.Log("BBox material cyan"); + yield return WaitForSpeechCommand(); + bbox.BoxMaterial = LoadAsset("MRTK_Standard_Cyan"); + Debug.Log("BBox material none"); + yield return WaitForSpeechCommand(); + bbox.BoxMaterial = null; + + Debug.Log("BBox grabbed green"); + yield return WaitForSpeechCommand(); + bbox.BoxGrabbedMaterial = LoadAsset("MRTK_Standard_Emerald"); + + Debug.Log("Wireframe radius 0.1"); + yield return WaitForSpeechCommand(); + bbox.WireframeEdgeRadius = 0.1f; + + Debug.Log("Wireframe shape cylinder"); + yield return WaitForSpeechCommand(); + bbox.WireframeShape = BoundingBox.WireframeType.Cylindrical; + } + + private T LoadAsset(string s) where T : UnityEngine.Object + { + string[] paths = AssetDatabase.FindAssets(s); + var result = (T)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(paths[0]), typeof(T)); + return result; + } + + private IEnumerator WaitForSpeechCommand() + { + while (!signal) + { + yield return null; + } + signal = false; + } + + public void OnSpeechKeywordRecognized(SpeechEventData eventData) + { + if (eventData.Command.Keyword.Equals("Select", System.StringComparison.CurrentCultureIgnoreCase)) + { + signal = true; + } + } +} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs.meta new file mode 100644 index 00000000000..a787c786eec --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9a76745b0a647f444b850e879efd3576 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index c149926814e..3c56a613160 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -142,7 +142,6 @@ public FlattenModeType FlattenAxis if (flattenAxis != value) { flattenAxis = value; - DestroyRig(); CreateRig(); } } @@ -159,7 +158,6 @@ public Vector3 BoxPadding if (Vector3.Distance(boxPadding, value) > float.Epsilon) { boxPadding = value; - DestroyRig(); CreateRig(); } } @@ -175,14 +173,7 @@ public Material BoxMaterial if (boxMaterial != value) { boxMaterial = value; - if (boxDisplay != null) - { - ApplyMaterialToAllRenderers(boxDisplay, boxMaterial); - } - else - { - AddBoxDisplay(); - } + CreateRig(); } } } @@ -209,7 +200,7 @@ public bool ShowWireFrame if (showWireframe != value) { showWireframe = value; - ResetHandleVisibility(); + CreateRig(); } } } @@ -225,7 +216,6 @@ public WireframeType WireframeShape if (wireframeShape != value) { wireframeShape = value; - DestroyRig(); CreateRig(); } } @@ -242,7 +232,6 @@ public Material WireframeMaterial if (wireframeMaterial != value) { wireframeMaterial = value; - DestroyRig(); CreateRig(); } } @@ -260,7 +249,6 @@ public float WireframeEdgeRadius if (wireframeEdgeRadius != value) { wireframeEdgeRadius = value; - DestroyRig(); CreateRig(); } } @@ -277,7 +265,6 @@ public Material HandleMaterial if (handleMaterial != value) { handleMaterial = value; - DestroyRig(); CreateRig(); } } @@ -295,7 +282,6 @@ public Material HandleGrabbedMaterial if (handleGrabbedMaterial != value) { handleGrabbedMaterial = value; - DestroyRig(); CreateRig(); } } @@ -313,7 +299,6 @@ public GameObject ScaleHandlePrefab if (scaleHandlePrefab != value) { scaleHandlePrefab = value; - DestroyRig(); CreateRig(); } } @@ -331,7 +316,6 @@ public GameObject ScaleHandleSlatePrefab if (scaleHandleSlatePrefab != value) { scaleHandleSlatePrefab = value; - DestroyRig(); CreateRig(); } } @@ -350,7 +334,6 @@ public float ScaleHandleSize if (scaleHandleSize != value) { scaleHandleSize = value; - DestroyRig(); CreateRig(); } } @@ -367,7 +350,6 @@ public GameObject RotationHandleSlatePrefab if (rotationHandlePrefab != value) { rotationHandlePrefab = value; - DestroyRig(); CreateRig(); } } @@ -384,7 +366,6 @@ public float RotationHandleDiameter if (rotationHandleDiameter != value) { rotationHandleDiameter = value; - DestroyRig(); CreateRig(); } } @@ -485,6 +466,21 @@ public bool DrawTetherWhenManipulating [Tooltip("Debug only. Component used to display debug messages")] public TextMesh debugText; + [SerializeField] + private bool hideElementsInInspector = true; + public bool HideElementsInInspector + { + get { return hideElementsInInspector; } + set + { + if (hideElementsInInspector != value) + { + hideElementsInInspector = value; + CreateRig(); + } + } + } + [Header("Events")] public UnityEvent RotateStarted; public UnityEvent RotateStopped; @@ -512,7 +508,8 @@ public bool DrawTetherWhenManipulating private Vector3 currentBoundsExtents; private BoundsCalculationMethod boundsMethod; - private bool hideElementsInInspector = true; + + private List touchingSources = new List(); private List links; From ca4a598a50a125d3802b63e52bdf8fee6ff985a4 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 16 May 2019 10:21:53 -0700 Subject: [PATCH 12/96] Fix incorrect bounds calculation when # components on bounding box < 3 --- .../Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs | 1 + .../Features/UX/Scripts/BoundingBox/BoundingBox.cs | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index 3b467158fee..4d1ab53eb54 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -21,6 +21,7 @@ private IEnumerator Sequence() // verify bbox can be created at scale of 1 var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); cube.GetComponent().material.color = Color.black; + cube.transform.position = Vector3.forward * 5; bbox = cube.AddComponent(); bbox.HideElementsInInspector = false; bbox.BoundingBoxActivation = BoundingBox.BoundingBoxActivationType.ActivateOnStart; diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index 3c56a613160..3e9e693d42f 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -1177,11 +1177,6 @@ private Bounds GetTargetBounds() private Bounds GetSingleObjectBounds(GameObject gameObject) { Bounds bounds = new Bounds(Vector3.zero, Vector3.zero); - Component[] components = gameObject.GetComponents(); - if (components.Length < 3) - { - return bounds; - } BoxCollider boxCollider; boxCollider = gameObject.GetComponent(); if (boxCollider == null) From d480d61645d6969dd7a86d742666a1c605932e8f Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Thu, 16 May 2019 10:22:01 -0700 Subject: [PATCH 13/96] Multi-scene editor testing support, multiple instances tests --- ...TestFixture_01_MixedRealityToolkitTests.cs | 85 ++++++++++++++++++- .../TestFixture_03_InputSystemTests.cs | 2 +- .../TestUtilities.cs | 72 ++++++++++++++-- 3 files changed, 147 insertions(+), 12 deletions(-) diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs index 4eafbc6dab6..bb7970e3e39 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs @@ -4,6 +4,7 @@ using Microsoft.MixedReality.Toolkit.Tests.Services; using NUnit.Framework; using UnityEngine; +using UnityEngine.SceneManagement; using UnityEngine.TestTools; namespace Microsoft.MixedReality.Toolkit.Tests.Core @@ -15,7 +16,7 @@ public class TestFixture_01_MixedRealityToolkitTests [Test] public void Test_01_InitializeMixedRealityToolkit() { - TestUtilities.CleanupScene(); + TestUtilities.CreateScenes(); new GameObject("MixedRealityToolkit").AddComponent(); MixedRealityToolkit.ConfirmInitialized(); @@ -27,7 +28,7 @@ public void Test_01_InitializeMixedRealityToolkit() [Test] public void Test_02_TestNoMixedRealityConfigurationFound() { - TestUtilities.CleanupScene(); + TestUtilities.CreateScenes(); new GameObject("MixedRealityToolkit").AddComponent(); MixedRealityToolkit.ConfirmInitialized(); @@ -592,10 +593,88 @@ public void Test_07_02_DisableServicesByType() } } + #region Multiple Instances Tests + + [Test] + public void Test_08_01_CreateMultipleInstances() + { + TestUtilities.InitializeMixedRealityToolkitScene(); + + MixedRealityToolkit secondInstance = new GameObject("MixedRealityToolkit").AddComponent(); + MixedRealityToolkit thirdInstance = new GameObject("MixedRealityToolkit").AddComponent(); + + Assert.AreNotEqual(secondInstance, MixedRealityToolkit.Instance); + Assert.AreNotEqual(thirdInstance, MixedRealityToolkit.Instance); + Assert.IsFalse(secondInstance.IsActiveInstance); + Assert.IsFalse(thirdInstance.IsActiveInstance); + } + + [Test] + public void Test_08_02_SwitchBetweenActiveInstances() + { + TestUtilities.InitializeMixedRealityToolkitScene(); + + MixedRealityToolkit secondInstance = new GameObject("MixedRealityToolkit").AddComponent(); + MixedRealityToolkit thirdInstance = new GameObject("MixedRealityToolkit").AddComponent(); + + Assert.AreNotEqual(secondInstance, MixedRealityToolkit.Instance); + Assert.AreNotEqual(thirdInstance, MixedRealityToolkit.Instance); + Assert.IsFalse(secondInstance.IsActiveInstance); + Assert.IsFalse(thirdInstance.IsActiveInstance); + + MixedRealityToolkit.SetActiveInstance(secondInstance); + + Assert.AreEqual(secondInstance, MixedRealityToolkit.Instance); + Assert.IsTrue(secondInstance.IsActiveInstance); + + MixedRealityToolkit.SetActiveInstance(thirdInstance); + + Assert.AreEqual(thirdInstance, MixedRealityToolkit.Instance); + Assert.IsTrue(thirdInstance.IsActiveInstance); + } + + [Test] + public void Test_08_03_DestroyActiveInstance() + { + TestUtilities.InitializeMixedRealityToolkitScene(); + + MixedRealityToolkit secondInstance = new GameObject("MixedRealityToolkit").AddComponent(); + + GameObject.DestroyImmediate(MixedRealityToolkit.Instance.gameObject); + + Assert.NotNull(MixedRealityToolkit.Instance); + Assert.AreEqual(secondInstance, MixedRealityToolkit.Instance); + Assert.IsTrue(secondInstance.IsActiveInstance); + } + + [Test] + public void Test_08_04_CreateMultipleInstancesInMultipleScenes() + { + TestUtilities.CreateScenes(3); + + for (int i = 0; i < SceneManager.sceneCount; i++) + { + Scene scene = SceneManager.GetSceneAt(i); + SceneManager.SetActiveScene(scene); + + TestUtilities.InitializeMixedRealityToolkit(); + } + + foreach (MixedRealityToolkit instance in GameObject.FindObjectsOfType()) + { + MixedRealityToolkit.SetActiveInstance(instance); + + Assert.AreEqual(instance, MixedRealityToolkit.Instance); + Assert.IsTrue(instance.IsActiveInstance); + } + } + + #endregion + [TearDown] public void CleanupMixedRealityToolkitTests() { - TestUtilities.CleanupScene(); + TestUtilities.TearDownScenes(); } } } diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs index e3b41c860f6..b352bac768b 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs @@ -78,7 +78,7 @@ public void Test04_TestMixedRealityInputSystemExists() [TearDown] public void CleanupMixedRealityToolkitTests() { - TestUtilities.CleanupScene(); + TestUtilities.CreateScenes(); } } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs index a0cea0db1c2..552f84cd9fb 100644 --- a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs +++ b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs @@ -1,11 +1,10 @@ // 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.Linq; using UnityEngine; using UnityEngine.SceneManagement; -using System; +using System.Collections.Generic; #if UNITY_EDITOR using Microsoft.MixedReality.Toolkit.Editor; @@ -22,23 +21,76 @@ namespace Microsoft.MixedReality.Toolkit.Tests { public static class TestUtilities { - public static Scene testScene; + const string primaryTestSceneTemporarySavePath = "Assets/__temp_primary_test_scene.unity"; + const string additiveTestSceneTemporarySavePath = "Assets/__temp_additive_test_scene_#.unity"; + public static Scene primaryTestScene; + public static Scene[] additiveTestScenes = new Scene[0]; public static void InitializeMixedRealityToolkit() { MixedRealityToolkit.ConfirmInitialized(); } - public static void CleanupScene() + public static void TearDownScenes() { - // Create a default test scene. +#if UNITY_EDITOR + // If any of our scenes were saved, tear down the assets + SceneAsset primaryTestSceneAsset = AssetDatabase.LoadAssetAtPath(primaryTestSceneTemporarySavePath); + if (primaryTestSceneAsset != null) + { + AssetDatabase.DeleteAsset(primaryTestSceneTemporarySavePath); + } + + for (int i = 0; i < additiveTestScenes.Length; i++) + { + string path = additiveTestSceneTemporarySavePath.Replace("#", i.ToString()); + SceneAsset additiveTestSceneAsset = AssetDatabase.LoadAssetAtPath(path); + if (additiveTestSceneAsset != null) + { + AssetDatabase.DeleteAsset(path); + } + } + AssetDatabase.Refresh(); +#endif + } + + public static void CreateScenes(int numScenesToCreate = 1) + { + Debug.Assert(numScenesToCreate > 0); + + // Create default test scenes. // In the editor this can be done using EditorSceneManager with a default setup. // In playmode the scene needs to be set up manually. #if UNITY_EDITOR if (!EditorApplication.isPlaying) { - EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects, NewSceneMode.Single); + List additiveTestScenesList = new List(); + + if (numScenesToCreate == 1) + { // No need to save this scene, we're just creating one + primaryTestScene = EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects, NewSceneMode.Single); + } + else + { + // Make the first scene single so it blows away previously loaded scenes + primaryTestScene = EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects, NewSceneMode.Single); + // Save the scene (temporarily) so we can load additively on top of it + EditorSceneManager.SaveScene(primaryTestScene, primaryTestSceneTemporarySavePath); + + for (int i = 1; i < numScenesToCreate; i++) + { + string path = additiveTestSceneTemporarySavePath.Replace("#", additiveTestScenesList.Count.ToString()); + // Create subsequent scenes additively + Scene additiveScene = EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects, NewSceneMode.Additive); + additiveTestScenesList.Add(additiveScene); + // Save the scene (temporarily) so we can load additively on top of it + EditorSceneManager.SaveScene(additiveScene, path); + } + } + + additiveTestScenes = additiveTestScenesList.ToArray(); + return; } #endif @@ -54,11 +106,15 @@ public static void InitializePlayspace() }); } - public static void InitializeMixedRealityToolkitScene(bool useDefaultProfile = false) + public static void InitializeMixedRealityToolkitScene(bool useDefaultProfile = false, int numScenesToCreate = 1) { // Setup - CleanupScene(); + CreateScenes(numScenesToCreate); + InitializeMixedRealityToolkit(useDefaultProfile); + } + public static void InitializeMixedRealityToolkit(bool useDefaultProfile = false) + { new GameObject("MixedRealityToolkit").AddComponent(); if (!MixedRealityToolkit.IsInitialized) From 539c93a72430f6ed419266509a50308a291fb9ea Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Thu, 16 May 2019 10:33:55 -0700 Subject: [PATCH 14/96] Completed merge --- .../Core/TestFixture_01_MixedRealityToolkitTests.cs | 6 ++++-- Assets/MixedRealityToolkit.Tests/TestUtilities.cs | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs index f436da053cb..4b08f4fca0f 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs @@ -16,7 +16,7 @@ public class TestFixture_01_MixedRealityToolkitTests [Test] public void Test_01_InitializeMixedRealityToolkit() { - TestUtilities.CleanupScene(); + TestUtilities.CreateScenes(); MixedRealityToolkit mixedRealityToolkit = new GameObject("MixedRealityToolkit").AddComponent(); MixedRealityToolkit.SetActiveInstance(mixedRealityToolkit); MixedRealityToolkit.ConfirmInitialized(); @@ -29,7 +29,7 @@ public void Test_01_InitializeMixedRealityToolkit() [Test] public void Test_02_TestNoMixedRealityConfigurationFound() { - TestUtilities.CleanupScene(); + TestUtilities.CreateScenes(); MixedRealityToolkit mixedRealityToolkit = new GameObject("MixedRealityToolkit").AddComponent(); MixedRealityToolkit.SetActiveInstance(mixedRealityToolkit); MixedRealityToolkit.ConfirmInitialized(); @@ -644,6 +644,8 @@ public void Test_08_03_DestroyActiveInstance() GameObject.DestroyImmediate(MixedRealityToolkit.Instance.gameObject); + MixedRealityToolkit.SetActiveInstance(secondInstance); + Assert.NotNull(MixedRealityToolkit.Instance); Assert.AreEqual(secondInstance, MixedRealityToolkit.Instance); Assert.IsTrue(secondInstance.IsActiveInstance); diff --git a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs index a95b532d42b..aca8b2452c9 100644 --- a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs +++ b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs @@ -113,6 +113,8 @@ public static void InitializeMixedRealityToolkitScene(bool useDefaultProfile = f InitializeMixedRealityToolkit(useDefaultProfile); } + public static void InitializeMixedRealityToolkit(bool useDefaultProfile = false) + { MixedRealityToolkit mixedRealityToolkit = new GameObject("MixedRealityToolkit").AddComponent(); MixedRealityToolkit.SetActiveInstance(mixedRealityToolkit); From 9924f27ffeea5e48e681dcb5ab8f80599ad610c3 Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Thu, 16 May 2019 10:45:16 -0700 Subject: [PATCH 15/96] Updated playmode tests --- Assets/MixedRealityToolkit.Tests/TestUtilities.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs index aca8b2452c9..a8129c79cc5 100644 --- a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs +++ b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs @@ -115,11 +115,10 @@ public static void InitializeMixedRealityToolkitScene(bool useDefaultProfile = f public static void InitializeMixedRealityToolkit(bool useDefaultProfile = false) { - MixedRealityToolkit mixedRealityToolkit = new GameObject("MixedRealityToolkit").AddComponent(); - MixedRealityToolkit.SetActiveInstance(mixedRealityToolkit); - if (!MixedRealityToolkit.IsInitialized) { + MixedRealityToolkit mixedRealityToolkit = new GameObject("MixedRealityToolkit").AddComponent(); + MixedRealityToolkit.SetActiveInstance(mixedRealityToolkit); MixedRealityToolkit.ConfirmInitialized(); } From 708f0e41efd6e5bd25e74af13ed404a471c3d9f1 Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Thu, 16 May 2019 14:35:11 -0700 Subject: [PATCH 16/96] Adding comments, clarifying method names --- ...TestFixture_01_MixedRealityToolkitTests.cs | 74 +++++++++++-------- .../GazePointerStateMachineTests.cs | 2 +- .../TestFixture_03_InputSystemTests.cs | 8 +- .../PlayModeTests/FocusProviderTests.cs | 2 +- .../PlayModeTests/InteractableTests.cs | 2 +- .../PlayModeTests/ManipulationHandlerTests.cs | 4 +- .../PlayModeTests/SimplePlayModeTests.cs | 2 +- .../TestUtilities.cs | 14 +++- 8 files changed, 65 insertions(+), 43 deletions(-) diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs index 4b08f4fca0f..03882d59405 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/Core/TestFixture_01_MixedRealityToolkitTests.cs @@ -45,7 +45,7 @@ public void Test_02_TestNoMixedRealityConfigurationFound() [Test] public void Test_03_CreateMixedRealityToolkit() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Tests Assert.AreEqual(0, MixedRealityToolkit.Instance.ActiveSystems.Count); @@ -59,7 +59,7 @@ public void Test_03_CreateMixedRealityToolkit() [Test] public void Test_04_01_RegisterMixedRealityDataProvider() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Register MixedRealityToolkit.Instance.RegisterService(new TestDataProvider1(null, null, "Test Data Provider 1", 10)); @@ -78,7 +78,7 @@ public void Test_04_01_RegisterMixedRealityDataProvider() [Test] public void Test_04_02_01_UnregisterMixedRealityDataProviderByType() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Register MixedRealityToolkit.Instance.RegisterService(new TestDataProvider1(null, null, "Test Data Provider 1", 10)); @@ -106,7 +106,7 @@ public void Test_04_02_01_UnregisterMixedRealityDataProviderByType() [Test] public void Test_04_02_02_UnregisterMixedRealityDataProviderByTypeAndName() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Register MixedRealityToolkit.Instance.RegisterService(new TestDataProvider1(null, null, "Test Data Provider 1", 10)); @@ -141,7 +141,7 @@ public void Test_04_02_02_UnregisterMixedRealityDataProviderByTypeAndName() [Test] public void Test_04_03_RegisterMixedRealityDataProviders() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test ExtensionService MixedRealityToolkit.Instance.RegisterService(new TestDataProvider1(null, null, "Test Data Provider 1", 10)); @@ -160,7 +160,7 @@ public void Test_04_03_RegisterMixedRealityDataProviders() [Test] public void Test_04_04_UnregisterMixedRealityDataProvidersByType() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test ExtensionService MixedRealityToolkit.Instance.RegisterService(new TestDataProvider1(null, null, "Test Data Provider 1", 10)); @@ -204,7 +204,7 @@ public void Test_04_04_UnregisterMixedRealityDataProvidersByType() [Test] public void Test_04_05_MixedRealityDataProviderDoesNotExist() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test data provider 1 MixedRealityToolkit.Instance.RegisterService(new TestDataProvider1(null, null, "Test Data Provider 1", 10)); @@ -220,7 +220,7 @@ public void Test_04_05_MixedRealityDataProviderDoesNotExist() [Test] public void Test_04_06_MixedRealityDataProviderDoesNotReturn() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); const string serviceName = "Test Data Provider"; @@ -237,7 +237,7 @@ public void Test_04_06_MixedRealityDataProviderDoesNotReturn() [Test] public void Test_04_07_ValidateMixedRealityDataProviderName() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); var testName1 = "Test04-07-1"; var testName2 = "Test04-07-2"; @@ -258,7 +258,7 @@ public void Test_04_07_ValidateMixedRealityDataProviderName() [Test] public void Test_04_08_GetMixedRealityDataProviderCollectionByInterface() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test data provider 1 MixedRealityToolkit.Instance.RegisterService(new TestDataProvider1(null, null, "Test04-08-1", 10)); @@ -277,7 +277,7 @@ public void Test_04_08_GetMixedRealityDataProviderCollectionByInterface() [Test] public void Test_04_09_GetAllMixedRealityDataProviders() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test 1 services MixedRealityToolkit.Instance.RegisterService(new TestDataProvider1(null, null, "Test16-1.1", 10)); @@ -301,7 +301,7 @@ public void Test_04_09_GetAllMixedRealityDataProviders() [Test] public void Test_05_01_RegisterMixedRealityExtensionService() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Register ITestExtensionService1 MixedRealityToolkit.Instance.RegisterService(new TestExtensionService1(null, "Test ExtensionService 1",10, null)); @@ -318,7 +318,7 @@ public void Test_05_01_RegisterMixedRealityExtensionService() [Test] public void Test_05_02_01_UnregisterMixedRealityExtensionServiceByType() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Register ITestExtensionService1 MixedRealityToolkit.Instance.RegisterService(new TestExtensionService1(null, "Test ExtensionService 1", 10, null)); @@ -347,7 +347,7 @@ public void Test_05_02_01_UnregisterMixedRealityExtensionServiceByType() [Test] public void Test_05_02_02_UnregisterMixedRealityExtensionServiceByTypeAndName() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Register ITestExtensionService1 MixedRealityToolkit.Instance.RegisterService(new TestExtensionService1(null, "Test ExtensionService 1", 10, null)); @@ -376,7 +376,7 @@ public void Test_05_02_02_UnregisterMixedRealityExtensionServiceByTypeAndName() [Test] public void Test_05_03_RegisterMixedRealityExtensionServices() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test ExtensionService MixedRealityToolkit.Instance.RegisterService(new TestExtensionService1(null, "Test ExtensionService 1", 10, null)); @@ -395,7 +395,7 @@ public void Test_05_03_RegisterMixedRealityExtensionServices() [Test] public void Test_05_04_UnregisterMixedRealityExtensionServicesByType() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test ExtensionService MixedRealityToolkit.Instance.RegisterService(new TestExtensionService1(null, "Test ExtensionService 1", 10, null)); @@ -439,7 +439,7 @@ public void Test_05_04_UnregisterMixedRealityExtensionServicesByType() [Test] public void Test_05_05_MixedRealityExtensionService2DoesNotExist() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test ExtensionService 1 MixedRealityToolkit.Instance.RegisterService(new TestExtensionService1(null, "Test ExtensionService 1", 10, null)); @@ -455,7 +455,7 @@ public void Test_05_05_MixedRealityExtensionService2DoesNotExist() [Test] public void Test_05_06_MixedRealityExtensionServiceDoesNotReturnByName() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); const string serviceName = "Test ExtensionService 1"; @@ -472,7 +472,7 @@ public void Test_05_06_MixedRealityExtensionServiceDoesNotReturnByName() [Test] public void Test_05_07_ValidateExtensionServiceName() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test ExtensionService 1 MixedRealityToolkit.Instance.RegisterService(new TestExtensionService1(null, "Test14-1", 10, null)); @@ -496,7 +496,7 @@ public void Test_05_07_ValidateExtensionServiceName() [Test] public void Test_05_08_GetMixedRealityExtensionServiceCollectionByInterface() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test ExtensionService 1 MixedRealityToolkit.Instance.RegisterService(new TestExtensionService1(null, "Test15-1", 10, null)); @@ -515,7 +515,7 @@ public void Test_05_08_GetMixedRealityExtensionServiceCollectionByInterface() [Test] public void Test_05_09_GetAllMixedRealityExtensionServices() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test 1 services MixedRealityToolkit.Instance.RegisterService(new TestExtensionService1(null, "Test16-1.1", 10, null)); @@ -537,7 +537,7 @@ public void Test_05_09_GetAllMixedRealityExtensionServices() [Test] public void Test_07_01_EnableServicesByType() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test 1 services MixedRealityToolkit.Instance.RegisterService(new TestDataProvider1(null, null, "Test07-01-1.1", 10)); @@ -563,7 +563,7 @@ public void Test_07_01_EnableServicesByType() [Test] public void Test_07_02_DisableServicesByType() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Add test 1 services MixedRealityToolkit.Instance.RegisterService(new TestDataProvider1(null, null, "Test07-01-1.1", 10)); @@ -600,7 +600,7 @@ public void Test_07_02_DisableServicesByType() [Test] public void Test_08_01_CreateMultipleInstances() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); MixedRealityToolkit secondInstance = new GameObject("MixedRealityToolkit").AddComponent(); MixedRealityToolkit thirdInstance = new GameObject("MixedRealityToolkit").AddComponent(); @@ -614,7 +614,7 @@ public void Test_08_01_CreateMultipleInstances() [Test] public void Test_08_02_SwitchBetweenActiveInstances() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); MixedRealityToolkit secondInstance = new GameObject("MixedRealityToolkit").AddComponent(); MixedRealityToolkit thirdInstance = new GameObject("MixedRealityToolkit").AddComponent(); @@ -638,7 +638,7 @@ public void Test_08_02_SwitchBetweenActiveInstances() [Test] public void Test_08_03_DestroyActiveInstance() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); MixedRealityToolkit secondInstance = new GameObject("MixedRealityToolkit").AddComponent(); @@ -660,16 +660,26 @@ public void Test_08_04_CreateMultipleInstancesInMultipleScenes() { Scene scene = SceneManager.GetSceneAt(i); SceneManager.SetActiveScene(scene); - - TestUtilities.InitializeMixedRealityToolkit(); + MixedRealityToolkit newInstance = new GameObject("MixedRealityToolkit").AddComponent(); } - foreach (MixedRealityToolkit instance in GameObject.FindObjectsOfType()) + MixedRealityToolkit[] instances = GameObject.FindObjectsOfType(); + for (int i = 0; i < instances.Length; i++) { - MixedRealityToolkit.SetActiveInstance(instance); + MixedRealityToolkit.SetActiveInstance(instances[i]); + + Assert.AreEqual(instances[i], MixedRealityToolkit.Instance); + Assert.IsTrue(instances[i].IsActiveInstance); + + for (int j = 0; j < instances.Length; j++) + { + if (i == j) + { + continue; + } - Assert.AreEqual(instance, MixedRealityToolkit.Instance); - Assert.IsTrue(instance.IsActiveInstance); + Assert.IsFalse(instances[j].IsActiveInstance); + } } } diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs index 1e51eefe4c2..d8a5b80f474 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs @@ -14,7 +14,7 @@ class GazePointerStateMachineTests [Test] public void TestHandAndSpeechBehaviour() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); // Initial state: gaze pointer active var gsm = new GazePointerVisibilityStateMachine(); diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs index b352bac768b..a4e53ff646d 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/TestFixture_03_InputSystemTests.cs @@ -13,7 +13,7 @@ public class TestFixture_03_InputSystemTests [Test] public void Test01_CreateMixedRealityInputSystem() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Create a Input System Profiles var inputSystemProfile = ScriptableObject.CreateInstance(); @@ -41,7 +41,7 @@ public void Test01_CreateMixedRealityInputSystem() [Test] public void Test02_TestGetMixedRealityInputSystem() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); // Retrieve Input System var inputSystem = MixedRealityToolkit.Instance.GetService(); @@ -53,7 +53,7 @@ public void Test02_TestGetMixedRealityInputSystem() [Test] public void Test03_TestMixedRealityInputSystemDoesNotExist() { - TestUtilities.InitializeMixedRealityToolkitScene(); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(); // Check for Input System var inputSystemExists = MixedRealityToolkit.Instance.IsServiceRegistered(); @@ -66,7 +66,7 @@ public void Test03_TestMixedRealityInputSystemDoesNotExist() [Test] public void Test04_TestMixedRealityInputSystemExists() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); // Check for Input System var inputSystemExists = MixedRealityToolkit.Instance.IsServiceRegistered(); diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/FocusProviderTests.cs b/Assets/MixedRealityToolkit.Tests/PlayModeTests/FocusProviderTests.cs index 2f2089edb6a..bd84ecdb699 100644 --- a/Assets/MixedRealityToolkit.Tests/PlayModeTests/FocusProviderTests.cs +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/FocusProviderTests.cs @@ -28,7 +28,7 @@ public class FocusProviderTests [UnityTest] public IEnumerator TestGazeCursorArticulated() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); TestUtilities.InitializePlayspace(); RenderSettings.skybox = null; diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs b/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs index 2a7708b0c0f..9000790386d 100644 --- a/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs @@ -25,7 +25,7 @@ class InteractableTests [UnityTest] public IEnumerator TestAddInteractableAtRuntime() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); TestUtilities.InitializePlayspace(); var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/ManipulationHandlerTests.cs b/Assets/MixedRealityToolkit.Tests/PlayModeTests/ManipulationHandlerTests.cs index ac20f728b40..884c51cd2af 100644 --- a/Assets/MixedRealityToolkit.Tests/PlayModeTests/ManipulationHandlerTests.cs +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/ManipulationHandlerTests.cs @@ -26,7 +26,7 @@ public class ManipulationHandlerTests [UnityTest] public IEnumerator Test01_ManipulationHandlerInstantiate() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); TestUtilities.InitializePlayspace(); RenderSettings.skybox = null; @@ -52,7 +52,7 @@ public IEnumerator Test01_ManipulationHandlerInstantiate() [UnityTest] public IEnumerator Test02_ManipulationHandlerGazeHover() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); TestUtilities.InitializePlayspace(); var testObject = GameObject.CreatePrimitive(PrimitiveType.Cube); diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/SimplePlayModeTests.cs b/Assets/MixedRealityToolkit.Tests/PlayModeTests/SimplePlayModeTests.cs index 66d459e4999..e898e0728d3 100644 --- a/Assets/MixedRealityToolkit.Tests/PlayModeTests/SimplePlayModeTests.cs +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/SimplePlayModeTests.cs @@ -17,7 +17,7 @@ public class SimplePlayModeTests [UnityTest] public IEnumerator Test01_WhizzySphere() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); MixedRealityPlayspace.PerformTransformation( p => diff --git a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs index a8129c79cc5..d0d14a9c20a 100644 --- a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs +++ b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs @@ -31,6 +31,9 @@ public static void InitializeMixedRealityToolkit() MixedRealityToolkit.ConfirmInitialized(); } + /// + /// Destroyes all scene assets that were created over the course of testing + /// public static void TearDownScenes() { #if UNITY_EDITOR @@ -54,6 +57,10 @@ public static void TearDownScenes() #endif } + /// + /// Creates a number of scenes and loads them additively for testing. Must create a minimum of 1. + /// + /// public static void CreateScenes(int numScenesToCreate = 1) { Debug.Assert(numScenesToCreate > 0); @@ -106,7 +113,12 @@ public static void InitializePlayspace() }); } - public static void InitializeMixedRealityToolkitScene(bool useDefaultProfile = false, int numScenesToCreate = 1) + /// + /// Creates the requested number of scenes, then creates one instance of the MixedRealityToolkit in the active scene. + /// + /// + /// + public static void InitializeMixedRealityToolkitAndCreateScenes(bool useDefaultProfile = false, int numScenesToCreate = 1) { // Setup CreateScenes(numScenesToCreate); From 81960f88617ca45086ef1eadb8063f958d62e173 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 16 May 2019 17:05:08 -0700 Subject: [PATCH 17/96] Fix bug when computing bounds --- .../Features/UX/Scripts/BoundingBox/BoundingBox.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index f1a3f3f722e..ad8c658f108 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -615,6 +615,7 @@ public BoxCollider TargetBounds // True if this game object is a child of the Target one private bool isChildOfTarget = false; + private readonly string rigRootName = "rigRoot"; #endregion Private Properties @@ -1126,7 +1127,15 @@ private Bounds GetTargetBounds() { Bounds bounds = new Bounds(); - if (Target.transform.childCount == 0) + int targetChildCount = 0; + for (int i = 0; i < Target.transform.childCount; i++) + { + if(!Target.transform.GetChild(i).name.Equals(rigRootName)) + { + targetChildCount++; + } + } + if (targetChildCount == 0) { bounds = GetSingleObjectBounds(Target); boundsMethod = BoundsCalculationMethod.Collider; @@ -1286,7 +1295,7 @@ private void SetMaterials() } private void InitializeDataStructures() { - rigRoot = new GameObject("rigRoot").transform; + rigRoot = new GameObject(rigRootName).transform; rigRoot.parent = transform; if (hideElementsInInspector == true) { From 3f2813f7576e16e82096056befd15517ac637cdb Mon Sep 17 00:00:00 2001 From: Will Wei Date: Thu, 16 May 2019 17:05:36 -0700 Subject: [PATCH 18/96] Add a default set of profiles that are optimized for getting started with HoloLens2 The default MRTK profile is good at showing off a lot of the features in VR and AR, but has some extra settings that either aren't necessary in AR (teleportation, boundary) or aren't performant (hand mesh visualization). Furthermore, there are also some settings that must be enabled specially in order to use HL2 features (such as Eye Tracking), which should really be set by default. This copies a subset of the configuration profiles with deltas as follows: 1. Boundary system is disabled. 2. Teleport system is disabled. 3. Spatial awareness system is disabled. 4. Eye tracking provider is added (https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/EyeTracking/EyeTracking_BasicSetup.html#create-an-eye-gaze-data-provider) 5. Eye simulation is eanbled by default (for input simulation). 6. Hand mesh visualization is disabled. 7. Camera profile settings are set to match, so that visual quality in the editor and device will look similar. --- .../Profiles/HoloLens2.meta | 8 ++ .../DefaultHoloLens2CameraProfile.asset | 23 +++++ .../DefaultHoloLens2CameraProfile.asset.meta | 8 ++ ...DefaultHoloLens2ConfigurationProfile.asset | 50 ++++++++++ ...ltHoloLens2ConfigurationProfile.asset.meta | 8 ++ .../DefaultHoloLens2HandTrackingProfile.asset | 25 +++++ ...ultHoloLens2HandTrackingProfile.asset.meta | 8 ++ .../DefaultHoloLens2InputSystemProfile.asset | 96 +++++++++++++++++++ ...aultHoloLens2InputSystemProfile.asset.meta | 8 ++ 9 files changed, 234 insertions(+) create mode 100644 Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2CameraProfile.asset create mode 100644 Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2CameraProfile.asset.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2ConfigurationProfile.asset create mode 100644 Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2ConfigurationProfile.asset.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2HandTrackingProfile.asset create mode 100644 Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2HandTrackingProfile.asset.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2InputSystemProfile.asset create mode 100644 Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2InputSystemProfile.asset.meta diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2.meta b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2.meta new file mode 100644 index 00000000000..6860f652faa --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9d8e053c6994da245aa13831114edb26 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2CameraProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2CameraProfile.asset new file mode 100644 index 00000000000..cb36fc167f7 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2CameraProfile.asset @@ -0,0 +1,23 @@ +%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: a4a1c93114e9437cb75d8b3ee4e0e1ba, type: 3} + m_Name: DefaultHoloLens2CameraProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + nearClipPlaneOpaqueDisplay: 0.1 + cameraClearFlagsOpaqueDisplay: 2 + backgroundColorOpaqueDisplay: {r: 0, g: 0, b: 0, a: 1} + opaqueQualityLevel: 0 + nearClipPlaneTransparentDisplay: 0.1 + cameraClearFlagsTransparentDisplay: 2 + backgroundColorTransparentDisplay: {r: 0, g: 0, b: 0, a: 0} + holoLensQualityLevel: 0 diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2CameraProfile.asset.meta b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2CameraProfile.asset.meta new file mode 100644 index 00000000000..bd92d3df37f --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2CameraProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0447581e7bd59f64fbb28151c65a3dc4 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2ConfigurationProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2ConfigurationProfile.asset new file mode 100644 index 00000000000..e6f26dc42e3 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2ConfigurationProfile.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: DefaultHoloLens2ConfigurationProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + targetExperienceScale: 3 + enableCameraSystem: 1 + cameraProfile: {fileID: 11400000, guid: 0447581e7bd59f64fbb28151c65a3dc4, type: 2} + cameraSystemType: + reference: Microsoft.MixedReality.Toolkit.CameraSystem.MixedRealityCameraSystem, + MixedRealityToolkit.Services.CameraSystem + enableInputSystem: 1 + inputSystemProfile: {fileID: 11400000, guid: bec5ceabcd10992439d51532332137f9, type: 2} + inputSystemType: + reference: Microsoft.MixedReality.Toolkit.Input.MixedRealityInputSystem, Microsoft.MixedReality.Toolkit.Services.InputSystem + enableBoundarySystem: 0 + boundarySystemType: + reference: Microsoft.MixedReality.Toolkit.Boundary.MixedRealityBoundarySystem, + Microsoft.MixedReality.Toolkit.Services.BoundarySystem + boundaryVisualizationProfile: {fileID: 11400000, guid: 6d28cce596b44bd3897ca86f8b24e076, + type: 2} + enableTeleportSystem: 0 + teleportSystemType: + reference: Microsoft.MixedReality.Toolkit.Teleport.MixedRealityTeleportSystem, + Microsoft.MixedReality.Toolkit.Services.TeleportSystem + enableSpatialAwarenessSystem: 0 + 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.SDK/Profiles/HoloLens2/DefaultHoloLens2ConfigurationProfile.asset.meta b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2ConfigurationProfile.asset.meta new file mode 100644 index 00000000000..4d33cab4f2c --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2ConfigurationProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7e7c962b9eb9dfa44993d5b2f2576752 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2HandTrackingProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2HandTrackingProfile.asset new file mode 100644 index 00000000000..dd0e9e2383d --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2HandTrackingProfile.asset @@ -0,0 +1,25 @@ +%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: 8275efdbe76bdff49a97a8e82fba118d, type: 3} + m_Name: DefaultHoloLens2HandTrackingProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + jointPrefab: {fileID: 1955475817299902, guid: 6a3f88d2571cd234a86d95ee5856b9ec, + type: 3} + palmPrefab: {fileID: 6797406804172968804, guid: 750bdc3344567a447960aae3eda2b462, + type: 3} + fingertipPrefab: {fileID: 7094064642998883381, guid: b37dde41a983d664c8a09a91313733e7, + type: 3} + handMeshPrefab: {fileID: 1887883006053652, guid: a86f479797fea8f4189f924b3b6ad979, + type: 3} + enableHandMeshVisualization: 0 + enableHandJointVisualization: 1 diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2HandTrackingProfile.asset.meta b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2HandTrackingProfile.asset.meta new file mode 100644 index 00000000000..7495b821d08 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2HandTrackingProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e445e6fda57508c46935bb141b7673a7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2InputSystemProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2InputSystemProfile.asset new file mode 100644 index 00000000000..fa128876be1 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2InputSystemProfile.asset @@ -0,0 +1,96 @@ +%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: DefaultHoloLens2InputSystemProfile + 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} + - componentType: + reference: Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider, + Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality + componentName: Windows Mixed Reality Eye Gaze Provider + priority: 0 + runtimePlatform: 8 + deviceManagerProfile: {fileID: 11400000, guid: 2d87dd11b18f700449c9dab320d19b99, + 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: e8d0393e66374dae9646851a57dc6bc1, + type: 2} + enableControllerMapping: 1 + controllerMappingProfile: {fileID: 11400000, guid: 39ded1fd0711a0c448413d0e1ec4f7f3, + type: 2} + controllerVisualizationProfile: {fileID: 11400000, guid: 345c06fdf3732db46b96299bd3cba653, + type: 2} + handTrackingProfile: {fileID: 11400000, guid: e445e6fda57508c46935bb141b7673a7, + type: 2} diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2InputSystemProfile.asset.meta b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2InputSystemProfile.asset.meta new file mode 100644 index 00000000000..d7d739b553f --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Profiles/HoloLens2/DefaultHoloLens2InputSystemProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bec5ceabcd10992439d51532332137f9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: From 74aa7200593ce58c2920968cc151f32c15dbc1b2 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 16 May 2019 17:37:43 -0700 Subject: [PATCH 19/96] Add status and info panel to bounding box runtime tests. --- .../Scenes/BoundingBoxRuntimeTest.unity | 1415 +++++++++++++++++ ...meta => BoundingBoxRuntimeTest.unity.meta} | 0 .../BoundingBox/Scenes/BoundingBoxTest.unity | 486 ------ .../UX/BoundingBox/Scripts/BoundingBoxTest.cs | 74 +- 4 files changed, 1460 insertions(+), 515 deletions(-) create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity rename Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/{BoundingBoxTest.unity.meta => BoundingBoxRuntimeTest.unity.meta} (100%) delete mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity new file mode 100644 index 00000000000..82436df25b3 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity @@ -0,0 +1,1415 @@ +%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: 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, g: 0, b: 0, 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 &264808312 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 264808313} + - component: {fileID: 264808317} + - component: {fileID: 264808316} + - component: {fileID: 264808315} + - component: {fileID: 264808314} + m_Layer: 0 + m_Name: Backpanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &264808313 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 264808312} + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0.3257, z: -0.004582405} + m_LocalScale: {x: 0.013220016, y: 0.33324012, z: 0.61351055} + m_Children: [] + m_Father: {fileID: 754333071} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!54 &264808314 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 264808312} + serializedVersion: 2 + m_Mass: 100 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 126 + m_CollisionDetection: 0 +--- !u!23 &264808315 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 264808312} + 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: a8de2758c4b4460cae694f0d50d94fbb, 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!65 &264808316 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 264808312} + 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!33 &264808317 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 264808312} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &342624755 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 342624756} + m_Layer: 0 + m_Name: MixedRealityPlayspace + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &342624756 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 342624755} + 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: 874614039} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &442498765 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 442498766} + - component: {fileID: 442498768} + - component: {fileID: 442498767} + - component: {fileID: 442498769} + - component: {fileID: 442498770} + m_Layer: 0 + m_Name: Status Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &442498766 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 442498765} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.222, y: 0.11016, z: 0} + m_LocalScale: {x: 0.008073663, y: 0.008073663, z: 0.008073663} + m_Children: [] + m_Father: {fileID: 1787100464} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!102 &442498767 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 442498765} + m_Text: Status Text + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 4 + m_Alignment: 0 + m_TabSize: 4 + m_FontSize: 48 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &442498768 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 442498765} + 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: 10100, guid: 0000000000000000e000000000000000, 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!114 &442498769 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 442498765} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b55691ad5b034fe6966763a6e23818d2, type: 3} + m_Name: + m_EditorClassIdentifier: + handedness: 0 + trackedObjectToReference: 0 + trackedHandJoint: 2 + additionalOffset: {x: 0, y: 0, z: 0} + additionalRotation: {x: 0, y: 0, z: 0} + transformTarget: {fileID: 0} + updateSolvers: 1 +--- !u!114 &442498770 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 442498765} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 14c3d8a4208d4b649529822e217623d4, type: 3} + m_Name: + m_EditorClassIdentifier: + updateLinkedTransform: 0 + moveLerpTime: 0.1 + rotateLerpTime: 0.1 + scaleLerpTime: 0 + maintainScale: 1 + smoothing: 0 + lifetime: 0 + SolverHandler: {fileID: 442498769} + orientationType: 0 + localOffset: {x: 0, y: 0, z: 1} + worldOffset: {x: 0, y: 0, z: 0} + useAngleSteppingForWorldOffset: 0 + tetherAngleSteps: 6 +--- !u!1 &442930015 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 442930016} + m_Layer: 0 + m_Name: TextContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &442930016 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 442930015} + 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: 1782114189} + - {fileID: 1825291914} + - {fileID: 652816307} + - {fileID: 1081672141} + m_Father: {fileID: 754333071} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 1025, y: 648} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &652816306 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 652816307} + - component: {fileID: 652816310} + - component: {fileID: 652816309} + - component: {fileID: 652816308} + m_Layer: 0 + m_Name: Rule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &652816307 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 652816306} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.0013, y: 0.369, z: -0.024082} + m_LocalScale: {x: 0.5497447, y: 0.0030726464, z: 1} + m_Children: [] + m_Father: {fileID: 442930016} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &652816308 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 652816306} + 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: 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: 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!64 &652816309 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 652816306} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Convex: 0 + m_CookingOptions: 14 + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &652816310 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 652816306} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &754333070 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 754333071} + m_Layer: 0 + m_Name: Panel1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &754333071 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 754333070} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.7, y: 0.7, z: 0.7} + m_Children: + - {fileID: 442930016} + - {fileID: 264808313} + m_Father: {fileID: 1801423600} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &874614036 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 874614039} + - component: {fileID: 874614038} + - component: {fileID: 874614037} + - component: {fileID: 874614042} + - component: {fileID: 874614041} + - component: {fileID: 874614040} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &874614037 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + m_Enabled: 1 +--- !u!20 &874614038 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + 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!4 &874614039 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + 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: 342624756} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &874614040 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + 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 + useEyeTracking: 0 +--- !u!114 &874614041 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + 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 &874614042 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874614036} + 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!1 &1081672140 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1081672141} + - component: {fileID: 1081672142} + m_Layer: 0 + m_Name: MRTK_Logo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1081672141 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1081672140} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.1519, y: 0.4273, z: -0.019582} + m_LocalScale: {x: 0.026762437, y: 0.026762437, z: 0.026762437} + m_Children: [] + m_Father: {fileID: 442930016} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!212 &1081672142 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1081672140} + 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: 10754, 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: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 10 + m_Sprite: {fileID: 21300000, guid: 84643a20fa6b4fa7969ef84ad2e40992, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 5.12, y: 2.24} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &1685224230 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1685224232} + - component: {fileID: 1685224231} + 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 &1685224231 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1685224230} + 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 &1685224232 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1685224230} + 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 &1782114188 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1782114189} + - component: {fileID: 1782114193} + - component: {fileID: 1782114192} + - component: {fileID: 1782114191} + - component: {fileID: 1782114190} + m_Layer: 0 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1782114189 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1782114188} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -0.0221} + m_LocalScale: {x: 0.009153391, y: 0.009153391, z: 0.009153391} + m_Children: [] + m_Father: {fileID: 442930016} + m_RootOrder: 0 + 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.1856, y: 0.3426} + m_SizeDelta: {x: 20, y: 5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1782114190 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1782114188} + 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: Bounding Box Runtime Tests + 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: 43.62 + m_fontSizeBase: 43.62 + 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: 0 + 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: -40.90899, w: 0} + m_textInfo: + textComponent: {fileID: 1782114190} + characterCount: 26 + spriteCount: 0 + spaceCount: 3 + wordCount: 4 + 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: 1782114193} + m_subTextObjects: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + m_maskType: 0 +--- !u!222 &1782114191 +CanvasRenderer: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1782114188} + m_CullTransparentMesh: 0 +--- !u!33 &1782114192 +MeshFilter: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1782114188} + m_Mesh: {fileID: 0} +--- !u!23 &1782114193 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1782114188} + 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 &1787100463 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1787100464} + m_Layer: 0 + m_Name: SceneContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1787100464 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1787100463} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1801423600} + - {fileID: 442498766} + - {fileID: 1993683264} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1801423599 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1801423600} + m_Layer: 0 + m_Name: SceneDescriptionPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1801423600 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1801423599} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.0019999966, y: 0.016, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 754333071} + m_Father: {fileID: 1787100464} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1825291913 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1825291914} + - component: {fileID: 1825291918} + - component: {fileID: 1825291917} + - component: {fileID: 1825291916} + - component: {fileID: 1825291915} + m_Layer: 0 + m_Name: Description + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1825291914 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1825291913} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -0.0221} + m_LocalScale: {x: 0.009153391, y: 0.009153391, z: 0.009153391} + m_Children: [] + m_Father: {fileID: 442930016} + 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.1856, y: 0.2786} + m_SizeDelta: {x: 20, y: 5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1825291915 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1825291913} + 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: 'This example demonstrates how to create a bounding box at runtime and modify + various bounding box properties. + + + Say "select" or press ''1'' to advance to the next example' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: afc8299d5d5bbd440a0616c8ecbc7217, type: 2} + m_sharedMaterial: {fileID: 21340371490990018, guid: afc8299d5d5bbd440a0616c8ecbc7217, + 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: 20 + m_fontSizeBase: 20 + 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: -40.90899, w: -7.350438} + m_textInfo: + textComponent: {fileID: 1825291915} + characterCount: 167 + spriteCount: 0 + spaceCount: 28 + wordCount: 28 + linkCount: 0 + lineCount: 4 + 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: 1825291918} + m_subTextObjects: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + m_maskType: 0 +--- !u!222 &1825291916 +CanvasRenderer: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1825291913} + m_CullTransparentMesh: 0 +--- !u!33 &1825291917 +MeshFilter: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1825291913} + m_Mesh: {fileID: 0} +--- !u!23 &1825291918 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1825291913} + 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: 21340371490990018, guid: afc8299d5d5bbd440a0616c8ecbc7217, 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 &1993683263 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1993683264} + - component: {fileID: 1993683265} + m_Layer: 0 + m_Name: Bounding Box Test + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1993683264 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1993683263} + 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: 1787100464} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1993683265 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1993683263} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9a76745b0a647f444b850e879efd3576, type: 3} + m_Name: + m_EditorClassIdentifier: + statusText: {fileID: 442498767} +--- !u!1 &2051637124 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2051637126} + - component: {fileID: 2051637125} + m_Layer: 0 + m_Name: MixedRealityToolkit + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2051637125 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2051637124} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 83d9acc7968244a8886f3af591305bcb, type: 3} + m_Name: + m_EditorClassIdentifier: + activeProfile: {fileID: 11400000, guid: 31a611a779d3499e8e35f1a2018ca841, type: 2} +--- !u!4 &2051637126 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2051637124} + 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} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity.meta rename to Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity deleted file mode 100644 index 6f519f70100..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxTest.unity +++ /dev/null @@ -1,486 +0,0 @@ -%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 &177802704 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 177802706} - - component: {fileID: 177802705} - m_Layer: 0 - m_Name: TestBBox - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &177802705 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 177802704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9a76745b0a647f444b850e879efd3576, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &177802706 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 177802704} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.17462003, y: 0.073931515, z: 0.92301} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &342624755 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 342624756} - m_Layer: 0 - m_Name: MixedRealityPlayspace - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &342624756 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 342624755} - 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: 874614039} - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &874614036 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 874614039} - - component: {fileID: 874614038} - - component: {fileID: 874614037} - - component: {fileID: 874614042} - - component: {fileID: 874614041} - - component: {fileID: 874614040} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &874614037 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 874614036} - m_Enabled: 1 ---- !u!20 &874614038 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 874614036} - 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!4 &874614039 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 874614036} - 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: 342624756} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &874614040 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 874614036} - 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 - useEyeTracking: 0 ---- !u!114 &874614041 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 874614036} - 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 &874614042 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 874614036} - 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!1 &1631278665 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1631278667} - - component: {fileID: 1631278666} - m_Layer: 0 - m_Name: AsyncCoroutineRunner - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1631278666 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1631278665} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8e6ecbbf0b5840b09d7b4ee7f0a62b7a, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1631278667 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1631278665} - 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: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1685224230 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1685224232} - - component: {fileID: 1685224231} - 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 &1685224231 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1685224230} - 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 &1685224232 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1685224230} - 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 &2051637124 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2051637126} - - component: {fileID: 2051637125} - m_Layer: 0 - m_Name: MixedRealityToolkit - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &2051637125 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2051637124} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 83d9acc7968244a8886f3af591305bcb, type: 3} - m_Name: - m_EditorClassIdentifier: - activeProfile: {fileID: 11400000, guid: 31a611a779d3499e8e35f1a2018ca841, type: 2} ---- !u!4 &2051637126 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2051637124} - 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} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index 4d1ab53eb54..bcde04fa928 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -7,70 +7,86 @@ public class BoundingBoxTest : InputSystemGlobalListener, IMixedRealitySpeechHandler { - BoundingBox bbox; - private bool signal; + [SerializeField] + private TextMesh statusText; + + private bool speechTriggeredFalg; + private Vector3 cubePosition = new Vector3(0, 0, 2); + // Start is called before the first frame update - void Start() + protected override void Start() { base.Start(); StartCoroutine(Sequence()); } + private void SetStatus(string status) + { + Debug.Assert(statusText != null, "statusText on BoundingBoxTest should not be null"); + statusText.text = $"Test {status}\nPress '1' or say 'select' to continue"; + } + private IEnumerator Sequence() { - // verify bbox can be created at scale of 1 var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); cube.GetComponent().material.color = Color.black; - cube.transform.position = Vector3.forward * 5; - bbox = cube.AddComponent(); + cube.transform.position = cubePosition; + + SetStatus("Instantiate BoundingBox"); + BoundingBox bbox = cube.AddComponent(); bbox.HideElementsInInspector = false; bbox.BoundingBoxActivation = BoundingBox.BoundingBoxActivationType.ActivateOnStart; var mh = cube.AddComponent(); - - Debug.Log("FlattenX"); yield return WaitForSpeechCommand(); + + SetStatus("FlattenX"); bbox.FlattenAxis = BoundingBox.FlattenModeType.FlattenX; - Debug.Log("FlattenY"); yield return WaitForSpeechCommand(); + + SetStatus("FlattenY"); bbox.FlattenAxis = BoundingBox.FlattenModeType.FlattenY; - Debug.Log("FlattenNone"); yield return WaitForSpeechCommand(); - bbox.FlattenAxis = BoundingBox.FlattenModeType.DoNotFlatten; - Debug.Log("BoxPadding .2"); + SetStatus("FlattenNone"); + bbox.FlattenAxis = BoundingBox.FlattenModeType.DoNotFlatten; yield return WaitForSpeechCommand(); + + SetStatus("BoxPadding 0.2f"); bbox.BoxPadding = new Vector3(0.2f, 0.2f, 0.2f); - Debug.Log("BoxPadding 0"); yield return WaitForSpeechCommand(); - bbox.BoxPadding = Vector3.zero; - Debug.Log("scalehandle widget"); + SetStatus("BoxPadding 0"); + bbox.BoxPadding = Vector3.zero; yield return WaitForSpeechCommand(); + + SetStatus("Set scale handle widget prefab"); bbox.ScaleHandleSize = 0.03f; bbox.ScaleHandlePrefab = LoadAsset("MRTK_BoundingBox_ScaleWidget"); - - Debug.Log("handles red"); yield return WaitForSpeechCommand(); - bbox.HandleMaterial = LoadAsset("MRTK_Standard_Red"); - Debug.Log("BBox material cyan"); + SetStatus("Handles red"); + bbox.HandleMaterial = LoadAsset("MRTK_Standard_Red"); yield return WaitForSpeechCommand(); + + SetStatus("BBox material cyan"); bbox.BoxMaterial = LoadAsset("MRTK_Standard_Cyan"); - Debug.Log("BBox material none"); yield return WaitForSpeechCommand(); - bbox.BoxMaterial = null; - Debug.Log("BBox grabbed green"); + SetStatus("BBox material none"); + bbox.BoxMaterial = null; yield return WaitForSpeechCommand(); - bbox.BoxGrabbedMaterial = LoadAsset("MRTK_Standard_Emerald"); - Debug.Log("Wireframe radius 0.1"); + SetStatus("BBox grabbed material green"); + bbox.BoxGrabbedMaterial = LoadAsset("MRTK_Standard_Emerald"); yield return WaitForSpeechCommand(); - bbox.WireframeEdgeRadius = 0.1f; - Debug.Log("Wireframe shape cylinder"); + SetStatus("Wireframe radius 0.1"); + bbox.WireframeEdgeRadius = 0.1f; yield return WaitForSpeechCommand(); + + SetStatus("Wireframe shape cylinder"); bbox.WireframeShape = BoundingBox.WireframeType.Cylindrical; + yield return WaitForSpeechCommand(); } private T LoadAsset(string s) where T : UnityEngine.Object @@ -82,18 +98,18 @@ private T LoadAsset(string s) where T : UnityEngine.Object private IEnumerator WaitForSpeechCommand() { - while (!signal) + while (!speechTriggeredFalg) { yield return null; } - signal = false; + speechTriggeredFalg = false; } public void OnSpeechKeywordRecognized(SpeechEventData eventData) { if (eventData.Command.Keyword.Equals("Select", System.StringComparison.CurrentCultureIgnoreCase)) { - signal = true; + speechTriggeredFalg = true; } } } From 59fd5cac3b549bdd2366ed6aed9bde466b92f7ce Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 16 May 2019 18:13:58 -0700 Subject: [PATCH 20/96] Don't require box collidable --- .../Features/UX/Scripts/BoundingBox/BoundingBox.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index ad8c658f108..eaaea058ee4 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -10,7 +10,7 @@ namespace Microsoft.MixedReality.Toolkit.UI { - public class BoundingBox : BaseFocusHandler, + public class BoundingBox : MonoBehaviour, IMixedRealityPointerHandler, IMixedRealitySourceStateHandler, IMixedRealityFocusChangedHandler, @@ -1735,6 +1735,10 @@ void IMixedRealityFocusHandler.OnFocusExit(FocusEventData eventData) } } + void IMixedRealityFocusHandler.OnFocusEnter(FocusEventData eventData) + { + } + void IMixedRealityPointerHandler.OnPointerUp(MixedRealityPointerEventData eventData) { if (currentPointer != null && eventData.Pointer == currentPointer) From 826f20947e48a6ecfaae6c88ddd7bd1f7454cadb Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 16 May 2019 18:15:25 -0700 Subject: [PATCH 21/96] Add test for bounding box around multiple objects (doesn't work yet) --- .../UX/BoundingBox/Scripts/BoundingBoxTest.cs | 149 +++++++++++------- 1 file changed, 89 insertions(+), 60 deletions(-) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index bcde04fa928..c85625592f0 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -1,4 +1,7 @@ -using Microsoft.MixedReality.Toolkit.Input; +// 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 Microsoft.MixedReality.Toolkit.UI; using System.Collections; using System.Collections.Generic; @@ -28,65 +31,91 @@ private void SetStatus(string status) private IEnumerator Sequence() { - var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); - cube.GetComponent().material.color = Color.black; - cube.transform.position = cubePosition; - - SetStatus("Instantiate BoundingBox"); - BoundingBox bbox = cube.AddComponent(); - bbox.HideElementsInInspector = false; - bbox.BoundingBoxActivation = BoundingBox.BoundingBoxActivationType.ActivateOnStart; - var mh = cube.AddComponent(); - yield return WaitForSpeechCommand(); - - SetStatus("FlattenX"); - bbox.FlattenAxis = BoundingBox.FlattenModeType.FlattenX; - yield return WaitForSpeechCommand(); - - SetStatus("FlattenY"); - bbox.FlattenAxis = BoundingBox.FlattenModeType.FlattenY; - yield return WaitForSpeechCommand(); - - SetStatus("FlattenNone"); - bbox.FlattenAxis = BoundingBox.FlattenModeType.DoNotFlatten; - yield return WaitForSpeechCommand(); - - SetStatus("BoxPadding 0.2f"); - bbox.BoxPadding = new Vector3(0.2f, 0.2f, 0.2f); - yield return WaitForSpeechCommand(); - - SetStatus("BoxPadding 0"); - bbox.BoxPadding = Vector3.zero; - yield return WaitForSpeechCommand(); - - SetStatus("Set scale handle widget prefab"); - bbox.ScaleHandleSize = 0.03f; - bbox.ScaleHandlePrefab = LoadAsset("MRTK_BoundingBox_ScaleWidget"); - yield return WaitForSpeechCommand(); - - SetStatus("Handles red"); - bbox.HandleMaterial = LoadAsset("MRTK_Standard_Red"); - yield return WaitForSpeechCommand(); - - SetStatus("BBox material cyan"); - bbox.BoxMaterial = LoadAsset("MRTK_Standard_Cyan"); - yield return WaitForSpeechCommand(); - - SetStatus("BBox material none"); - bbox.BoxMaterial = null; - yield return WaitForSpeechCommand(); - - SetStatus("BBox grabbed material green"); - bbox.BoxGrabbedMaterial = LoadAsset("MRTK_Standard_Emerald"); - yield return WaitForSpeechCommand(); - - SetStatus("Wireframe radius 0.1"); - bbox.WireframeEdgeRadius = 0.1f; - yield return WaitForSpeechCommand(); - - SetStatus("Wireframe shape cylinder"); - bbox.WireframeShape = BoundingBox.WireframeType.Cylindrical; - yield return WaitForSpeechCommand(); + { + var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); + cube.GetComponent().material = LoadAsset("MRTK_Standard_DarkGray"); + cube.transform.position = cubePosition; + + SetStatus("Instantiate BoundingBox"); + BoundingBox bbox = cube.AddComponent(); + bbox.HideElementsInInspector = false; + bbox.BoundingBoxActivation = BoundingBox.BoundingBoxActivationType.ActivateOnStart; + var mh = cube.AddComponent(); + yield return WaitForSpeechCommand(); + + SetStatus("FlattenX"); + bbox.FlattenAxis = BoundingBox.FlattenModeType.FlattenX; + yield return WaitForSpeechCommand(); + + SetStatus("FlattenY"); + bbox.FlattenAxis = BoundingBox.FlattenModeType.FlattenY; + yield return WaitForSpeechCommand(); + + SetStatus("FlattenNone"); + bbox.FlattenAxis = BoundingBox.FlattenModeType.DoNotFlatten; + yield return WaitForSpeechCommand(); + + SetStatus("BoxPadding 0.2f"); + bbox.BoxPadding = new Vector3(0.2f, 0.2f, 0.2f); + yield return WaitForSpeechCommand(); + + SetStatus("BoxPadding 0"); + bbox.BoxPadding = Vector3.zero; + yield return WaitForSpeechCommand(); + + SetStatus("Set scale handle widget prefab"); + bbox.ScaleHandleSize = 0.03f; + bbox.ScaleHandlePrefab = LoadAsset("MRTK_BoundingBox_ScaleWidget"); + yield return WaitForSpeechCommand(); + + SetStatus("Handles red"); + bbox.HandleMaterial = LoadAsset("MRTK_Standard_Red"); + yield return WaitForSpeechCommand(); + + SetStatus("BBox material cyan"); + bbox.BoxMaterial = LoadAsset("MRTK_Standard_Cyan"); + yield return WaitForSpeechCommand(); + + SetStatus("BBox material none"); + bbox.BoxMaterial = null; + yield return WaitForSpeechCommand(); + + SetStatus("BBox grabbed material green"); + bbox.BoxGrabbedMaterial = LoadAsset("MRTK_Standard_Emerald"); + yield return WaitForSpeechCommand(); + + SetStatus("Wireframe radius 0.1"); + bbox.WireframeEdgeRadius = 0.1f; + yield return WaitForSpeechCommand(); + + SetStatus("Wireframe shape cylinder"); + bbox.WireframeShape = BoundingBox.WireframeType.Cylindrical; + yield return WaitForSpeechCommand(); + + GameObject.Destroy(cube); + } + + { + + SetStatus("Many children"); + + GameObject multiRoot = new GameObject(); + multiRoot.name = "multiRoot"; + multiRoot.transform.position = cubePosition; + int numCubes = 10; + for (int i = 0; i < numCubes; i++) + { + var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); + cube.transform.localScale = Vector3.one * 0.1f; + cube.transform.parent = multiRoot.transform; + cube.transform.localPosition = Random.insideUnitSphere; + cube.transform.rotation = Quaternion.Euler(Random.insideUnitSphere * 360f); + } + var bbox = multiRoot.AddComponent(); + bbox.BoundingBoxActivation = BoundingBox.BoundingBoxActivationType.ActivateOnStart; + bbox.HideElementsInInspector = false; + multiRoot.AddComponent(); + } } private T LoadAsset(string s) where T : UnityEngine.Object From 13b6a85a33b0b327e4c9235fae25d794abc21a57 Mon Sep 17 00:00:00 2001 From: Yoon Park Date: Fri, 17 May 2019 00:11:21 -0700 Subject: [PATCH 22/96] Adding new shell cursor assets and prefabs --- .../UX/Meshes/Cursors/Cursor_Focus_geo.fbx | Bin 0 -> 22864 bytes .../Meshes/Cursors/Cursor_Focus_geo.fbx.meta | 108 +++ .../UX/Meshes/Cursors/Cursor_IBeam.fbx | Bin 0 -> 21616 bytes .../UX/Meshes/Cursors/Cursor_IBeam.fbx.meta | 102 +++ .../Cursors/Cursor_MousePointer_geo.fbx | 657 ++++++++++++++++++ .../Cursors/Cursor_MousePointer_geo.fbx.meta | 102 +++ .../Meshes/Cursors/Cursor_MoveArrows_geo.fbx | Bin 0 -> 20720 bytes .../Cursors/Cursor_MoveArrows_geo.fbx.meta | 108 +++ .../UX/Meshes/Cursors/Cursor_Press_geo.fbx | Bin 0 -> 22240 bytes .../Meshes/Cursors/Cursor_Press_geo.fbx.meta | 108 +++ .../UX/Meshes/Cursors/Cursor_Rest_geo.fbx | Bin 0 -> 21392 bytes .../Meshes/Cursors/Cursor_Rest_geo.fbx.meta | 108 +++ .../Cursors/Cursor_RotateArrows_geo.fbx | Bin 0 -> 22272 bytes .../Cursors/Cursor_RotateArrows_geo.fbx.meta | 108 +++ .../Features/UX/Meshes/Cursors/Materials.meta | 8 + .../UX/Meshes/Cursors/Materials/Light.mat | 161 +++++ .../Meshes/Cursors/Materials/Light.mat.meta | 8 + .../Meshes/Cursors/Materials/MousePointer.mat | 160 +++++ .../Cursors/Materials/MousePointer.mat.meta | 8 + .../Meshes/Cursors/Materials/SHADOW_PBR.mat | 161 +++++ .../Cursors/Materials/SHADOW_PBR.mat.meta | 8 + .../UX/Meshes/Cursors/Materials/Shadow.mat | 161 +++++ .../Meshes/Cursors/Materials/Shadow.mat.meta | 8 + .../UX/Meshes/Cursors/Materials/ibeam_dx.mat | 161 +++++ .../Cursors/Materials/ibeam_dx.mat.meta | 8 + .../Features/UX/Meshes/Cursors/Textures.meta | 8 + .../Textures/Cursor_MousePointer_tex.png | Bin 0 -> 20502 bytes .../Textures/Cursor_MousePointer_tex.png.meta | 88 +++ .../Cursors/Textures/Cursor_Move_Shadow.png | Bin 0 -> 1510 bytes .../Textures/Cursor_Move_Shadow.png.meta | 88 +++ .../Cursors/Textures/Cursor_Ring_Shadow.png | Bin 0 -> 5192 bytes .../Textures/Cursor_Ring_Shadow.png.meta | 88 +++ .../Cursors/Textures/Cursor_Rotate_Shadow.png | Bin 0 -> 1691 bytes .../Textures/Cursor_Rotate_Shadow.png.meta | 88 +++ .../UX/Prefabs/Cursors/CursorFocus.prefab | 80 +++ .../Prefabs/Cursors/CursorFocus.prefab.meta | 7 + .../Prefabs/Cursors/CursorMousePointer.prefab | 79 +++ .../Cursors/CursorMousePointer.prefab.meta | 7 + .../Cursors/CursorMoveArrowsEastWest.prefab | 80 +++ .../CursorMoveArrowsEastWest.prefab.meta | 7 + .../Cursors/CursorMoveArrowsMove.prefab | 159 +++++ .../Cursors/CursorMoveArrowsMove.prefab.meta | 7 + .../Cursors/CursorMoveArrowsNorthSouth.prefab | 80 +++ .../CursorMoveArrowsNorthSouth.prefab.meta | 7 + .../CursorMoveArrowsNortheastSouthwest.prefab | 80 +++ ...orMoveArrowsNortheastSouthwest.prefab.meta | 7 + .../CursorMoveArrowsNorthwestSoutheast.prefab | 80 +++ ...orMoveArrowsNorthwestSoutheast.prefab.meta | 7 + .../UX/Prefabs/Cursors/CursorPress.prefab | 80 +++ .../Prefabs/Cursors/CursorPress.prefab.meta | 7 + .../UX/Prefabs/Cursors/CursorRest.prefab | 80 +++ .../UX/Prefabs/Cursors/CursorRest.prefab.meta | 7 + .../CursorRotateArrowsHorizontal.prefab | 80 +++ .../CursorRotateArrowsHorizontal.prefab.meta | 7 + .../Cursors/CursorRotateArrowsVertical.prefab | 80 +++ .../CursorRotateArrowsVertical.prefab.meta | 7 + 56 files changed, 3648 insertions(+) create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Focus_geo.fbx create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Focus_geo.fbx.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_IBeam.fbx create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_IBeam.fbx.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MoveArrows_geo.fbx create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MoveArrows_geo.fbx.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Press_geo.fbx create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Press_geo.fbx.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Light.mat create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Light.mat.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/MousePointer.mat create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/MousePointer.mat.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/SHADOW_PBR.mat create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/SHADOW_PBR.mat.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Shadow.mat create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Shadow.mat.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/ibeam_dx.mat create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/ibeam_dx.mat.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_MousePointer_tex.png create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_MousePointer_tex.png.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Move_Shadow.png create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Move_Shadow.png.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Ring_Shadow.png create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Ring_Shadow.png.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Rotate_Shadow.png create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Rotate_Shadow.png.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorFocus.prefab create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorFocus.prefab.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMousePointer.prefab create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMousePointer.prefab.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMoveArrowsEastWest.prefab create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMoveArrowsEastWest.prefab.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMoveArrowsMove.prefab create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMoveArrowsMove.prefab.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMoveArrowsNorthSouth.prefab create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMoveArrowsNorthSouth.prefab.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMoveArrowsNortheastSouthwest.prefab create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMoveArrowsNortheastSouthwest.prefab.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMoveArrowsNorthwestSoutheast.prefab create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorMoveArrowsNorthwestSoutheast.prefab.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorPress.prefab create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorPress.prefab.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorRest.prefab create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorRest.prefab.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorRotateArrowsHorizontal.prefab create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorRotateArrowsHorizontal.prefab.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorRotateArrowsVertical.prefab create mode 100644 Assets/MixedRealityToolkit.SDK/Features/UX/Prefabs/Cursors/CursorRotateArrowsVertical.prefab.meta diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Focus_geo.fbx b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Focus_geo.fbx new file mode 100644 index 0000000000000000000000000000000000000000..ac3d52202af58b1a336039f09cfea0c064b14d06 GIT binary patch literal 22864 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 XZ;qA<0_sPt>;mr)} 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 R`Sl$qj+efb+BS3C{{Rl}pMwAZ literal 0 HcmV?d00001 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_IBeam.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_IBeam.fbx.meta new file mode 100644 index 00000000000..7c46e37300c --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_IBeam.fbx.meta @@ -0,0 +1,102 @@ +fileFormatVersion: 2 +guid: 968d2afac55bd06469d22c1563df5855 +ModelImporter: + serializedVersion: 23 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2100000: ibeam_dx + 2300000: //RootNode + 3300000: //RootNode + 4300000: Cursor_IBeam + externalObjects: + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: ibeam_dx + second: {fileID: 2100000, guid: fc1b6cd8da653e3448dcdb722ada2ebc, type: 2} + 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 + useSRGBMaterialColor: 1 + 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 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + 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.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx new file mode 100644 index 00000000000..996f0dd1e62 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx @@ -0,0 +1,657 @@ +; FBX 7.3.0 project file +; Copyright (C) 1997-2010 Autodesk Inc. and/or its licensors. +; All rights reserved. +; ---------------------------------------------------- + +FBXHeaderExtension: { + FBXHeaderVersion: 1003 + FBXVersion: 7300 + CreationTimeStamp: { + Version: 1000 + Year: 2016 + Month: 9 + Day: 8 + Hour: 12 + Minute: 45 + Second: 19 + Millisecond: 466 + } + Creator: "FBX SDK/FBX Plugins version 2016.0" + SceneInfo: "SceneInfo::GlobalInfo", "UserData" { + Type: "UserData" + Version: 100 + MetaData: { + Version: 100 + Title: "" + Subject: "" + Author: "" + Keywords: "" + Revision: "" + Comment: "" + } + Properties70: { + P: "DocumentUrl", "KString", "Url", "", "C:\Users\dasierra\Desktop\Cursor\models\shl_csrPointer_geo.fbx" + P: "SrcDocumentUrl", "KString", "Url", "", "C:\Users\dasierra\Desktop\Cursor\models\shl_csrPointer_geo.fbx" + P: "Original", "Compound", "", "" + P: "Original|ApplicationVendor", "KString", "", "", "Autodesk" + P: "Original|ApplicationName", "KString", "", "", "Maya" + P: "Original|ApplicationVersion", "KString", "", "", "2016" + P: "Original|DateTime_GMT", "DateTime", "", "", "08/09/2016 19:45:19.465" + P: "Original|FileName", "KString", "", "", "C:/Users/dasierra/Desktop/Cursor/models/shl_csrPointer_geo.fbx" + P: "LastSaved", "Compound", "", "" + P: "LastSaved|ApplicationVendor", "KString", "", "", "Autodesk" + P: "LastSaved|ApplicationName", "KString", "", "", "Maya" + P: "LastSaved|ApplicationVersion", "KString", "", "", "2016" + P: "LastSaved|DateTime_GMT", "DateTime", "", "", "08/09/2016 19:45:19.465" + } + } +} +GlobalSettings: { + Version: 1000 + Properties70: { + P: "UpAxis", "int", "Integer", "",1 + P: "UpAxisSign", "int", "Integer", "",1 + P: "FrontAxis", "int", "Integer", "",2 + P: "FrontAxisSign", "int", "Integer", "",1 + P: "CoordAxis", "int", "Integer", "",0 + P: "CoordAxisSign", "int", "Integer", "",1 + P: "OriginalUpAxis", "int", "Integer", "",1 + P: "OriginalUpAxisSign", "int", "Integer", "",1 + P: "UnitScaleFactor", "double", "Number", "",1 + P: "OriginalUnitScaleFactor", "double", "Number", "",1 + P: "AmbientColor", "ColorRGB", "Color", "",0,0,0 + P: "DefaultCamera", "KString", "", "", "Producer Perspective" + P: "TimeMode", "enum", "", "",6 + P: "TimeProtocol", "enum", "", "",2 + P: "SnapOnFrameMode", "enum", "", "",0 + P: "TimeSpanStart", "KTime", "Time", "",1539538600 + P: "TimeSpanStop", "KTime", "Time", "",392582343000 + P: "CustomFrameRate", "double", "Number", "",-1 + P: "TimeMarker", "Compound", "", "" + P: "CurrentTimeMarker", "int", "Integer", "",-1 + } +} + +; Documents Description +;------------------------------------------------------------------ + +Documents: { + Count: 1 + Document: 2450899729056, "", "Scene" { + Properties70: { + P: "SourceObject", "object", "", "" + P: "ActiveAnimStackName", "KString", "", "", "Take 001" + } + RootNode: 0 + } +} + +; Document References +;------------------------------------------------------------------ + +References: { +} + +; Object definitions +;------------------------------------------------------------------ + +Definitions: { + Version: 100 + Count: 15 + ObjectType: "GlobalSettings" { + Count: 1 + } + ObjectType: "AnimationStack" { + Count: 1 + PropertyTemplate: "FbxAnimStack" { + Properties70: { + P: "Description", "KString", "", "", "" + P: "LocalStart", "KTime", "Time", "",0 + P: "LocalStop", "KTime", "Time", "",0 + P: "ReferenceStart", "KTime", "Time", "",0 + P: "ReferenceStop", "KTime", "Time", "",0 + } + } + } + ObjectType: "AnimationLayer" { + Count: 1 + PropertyTemplate: "FbxAnimLayer" { + Properties70: { + P: "Weight", "Number", "", "A",100 + P: "Mute", "bool", "", "",0 + P: "Solo", "bool", "", "",0 + P: "Lock", "bool", "", "",0 + P: "Color", "ColorRGB", "Color", "",0.8,0.8,0.8 + P: "BlendMode", "enum", "", "",0 + P: "RotationAccumulationMode", "enum", "", "",0 + P: "ScaleAccumulationMode", "enum", "", "",0 + P: "BlendModeBypass", "ULongLong", "", "",0 + } + } + } + ObjectType: "Geometry" { + Count: 1 + PropertyTemplate: "FbxMesh" { + Properties70: { + P: "Color", "ColorRGB", "Color", "",0.8,0.8,0.8 + P: "BBoxMin", "Vector3D", "Vector", "",0,0,0 + P: "BBoxMax", "Vector3D", "Vector", "",0,0,0 + P: "Primary Visibility", "bool", "", "",1 + P: "Casts Shadows", "bool", "", "",1 + P: "Receive Shadows", "bool", "", "",1 + } + } + } + ObjectType: "Material" { + Count: 1 + PropertyTemplate: "FbxSurfaceMaterial" { + Properties70: { + P: "ShadingModel", "KString", "", "", "Unknown" + P: "MultiLayer", "bool", "", "",0 + } + } + } + ObjectType: "Implementation" { + Count: 1 + PropertyTemplate: "FbxImplementation" { + Properties70: { + P: "ShaderLanguage", "KString", "", "", "MentalRaySL" + P: "ShaderLanguageVersion", "KString", "", "", "" + P: "RenderAPI", "KString", "", "", "MentalRay" + P: "RenderAPIVersion", "KString", "", "", "" + P: "RootBindingName", "KString", "", "", "" + P: "Constants", "Compound", "", "" + } + } + } + ObjectType: "BindingTable" { + Count: 1 + PropertyTemplate: "FbxBindingTable" { + Properties70: { + P: "TargetName", "KString", "", "", "" + P: "TargetType", "KString", "", "", "" + P: "CodeAbsoluteURL", "KString", "XRefUrl", "", "" + P: "CodeRelativeURL", "KString", "XRefUrl", "", "" + P: "CodeTAG", "KString", "", "", "shader" + P: "DescAbsoluteURL", "KString", "XRefUrl", "", "" + P: "DescRelativeURL", "KString", "XRefUrl", "", "" + P: "DescTAG", "KString", "", "", "shader" + } + } + } + ObjectType: "Texture" { + Count: 2 + PropertyTemplate: "FbxFileTexture" { + Properties70: { + P: "TextureTypeUse", "enum", "", "",0 + P: "Texture alpha", "Number", "", "A",1 + P: "CurrentMappingType", "enum", "", "",0 + P: "WrapModeU", "enum", "", "",0 + P: "WrapModeV", "enum", "", "",0 + P: "UVSwap", "bool", "", "",0 + P: "PremultiplyAlpha", "bool", "", "",1 + P: "Translation", "Vector", "", "A",0,0,0 + P: "Rotation", "Vector", "", "A",0,0,0 + P: "Scaling", "Vector", "", "A",1,1,1 + P: "TextureRotationPivot", "Vector3D", "Vector", "",0,0,0 + P: "TextureScalingPivot", "Vector3D", "Vector", "",0,0,0 + P: "CurrentTextureBlendMode", "enum", "", "",1 + P: "UVSet", "KString", "", "", "default" + P: "UseMaterial", "bool", "", "",0 + P: "UseMipMap", "bool", "", "",0 + } + } + } + ObjectType: "Model" { + Count: 1 + PropertyTemplate: "FbxNode" { + Properties70: { + P: "QuaternionInterpolate", "enum", "", "",0 + P: "RotationOffset", "Vector3D", "Vector", "",0,0,0 + P: "RotationPivot", "Vector3D", "Vector", "",0,0,0 + P: "ScalingOffset", "Vector3D", "Vector", "",0,0,0 + P: "ScalingPivot", "Vector3D", "Vector", "",0,0,0 + P: "TranslationActive", "bool", "", "",0 + P: "TranslationMin", "Vector3D", "Vector", "",0,0,0 + P: "TranslationMax", "Vector3D", "Vector", "",0,0,0 + P: "TranslationMinX", "bool", "", "",0 + P: "TranslationMinY", "bool", "", "",0 + P: "TranslationMinZ", "bool", "", "",0 + P: "TranslationMaxX", "bool", "", "",0 + P: "TranslationMaxY", "bool", "", "",0 + P: "TranslationMaxZ", "bool", "", "",0 + P: "RotationOrder", "enum", "", "",0 + P: "RotationSpaceForLimitOnly", "bool", "", "",0 + P: "RotationStiffnessX", "double", "Number", "",0 + P: "RotationStiffnessY", "double", "Number", "",0 + P: "RotationStiffnessZ", "double", "Number", "",0 + P: "AxisLen", "double", "Number", "",10 + P: "PreRotation", "Vector3D", "Vector", "",0,0,0 + P: "PostRotation", "Vector3D", "Vector", "",0,0,0 + P: "RotationActive", "bool", "", "",0 + P: "RotationMin", "Vector3D", "Vector", "",0,0,0 + P: "RotationMax", "Vector3D", "Vector", "",0,0,0 + P: "RotationMinX", "bool", "", "",0 + P: "RotationMinY", "bool", "", "",0 + P: "RotationMinZ", "bool", "", "",0 + P: "RotationMaxX", "bool", "", "",0 + P: "RotationMaxY", "bool", "", "",0 + P: "RotationMaxZ", "bool", "", "",0 + P: "InheritType", "enum", "", "",0 + P: "ScalingActive", "bool", "", "",0 + P: "ScalingMin", "Vector3D", "Vector", "",0,0,0 + P: "ScalingMax", "Vector3D", "Vector", "",1,1,1 + P: "ScalingMinX", "bool", "", "",0 + P: "ScalingMinY", "bool", "", "",0 + P: "ScalingMinZ", "bool", "", "",0 + P: "ScalingMaxX", "bool", "", "",0 + P: "ScalingMaxY", "bool", "", "",0 + P: "ScalingMaxZ", "bool", "", "",0 + P: "GeometricTranslation", "Vector3D", "Vector", "",0,0,0 + P: "GeometricRotation", "Vector3D", "Vector", "",0,0,0 + P: "GeometricScaling", "Vector3D", "Vector", "",1,1,1 + P: "MinDampRangeX", "double", "Number", "",0 + P: "MinDampRangeY", "double", "Number", "",0 + P: "MinDampRangeZ", "double", "Number", "",0 + P: "MaxDampRangeX", "double", "Number", "",0 + P: "MaxDampRangeY", "double", "Number", "",0 + P: "MaxDampRangeZ", "double", "Number", "",0 + P: "MinDampStrengthX", "double", "Number", "",0 + P: "MinDampStrengthY", "double", "Number", "",0 + P: "MinDampStrengthZ", "double", "Number", "",0 + P: "MaxDampStrengthX", "double", "Number", "",0 + P: "MaxDampStrengthY", "double", "Number", "",0 + P: "MaxDampStrengthZ", "double", "Number", "",0 + P: "PreferedAngleX", "double", "Number", "",0 + P: "PreferedAngleY", "double", "Number", "",0 + P: "PreferedAngleZ", "double", "Number", "",0 + P: "LookAtProperty", "object", "", "" + P: "UpVectorProperty", "object", "", "" + P: "Show", "bool", "", "",1 + P: "NegativePercentShapeSupport", "bool", "", "",1 + P: "DefaultAttributeIndex", "int", "Integer", "",-1 + P: "Freeze", "bool", "", "",0 + P: "LODBox", "bool", "", "",0 + P: "Lcl Translation", "Lcl Translation", "", "A",0,0,0 + P: "Lcl Rotation", "Lcl Rotation", "", "A",0,0,0 + P: "Lcl Scaling", "Lcl Scaling", "", "A",1,1,1 + P: "Visibility", "Visibility", "", "A",1 + P: "Visibility Inheritance", "Visibility Inheritance", "", "",1 + } + } + } + ObjectType: "Container" { + Count: 2 + PropertyTemplate: "FbxContainer" { + Properties70: { + P: "templateName", "KString", "", "", "" + P: "templatePath", "KString", "", "", "" + P: "templateVersion", "KString", "", "", "" + P: "viewName", "KString", "", "", "" + } + } + } + ObjectType: "Video" { + Count: 3 + PropertyTemplate: "FbxVideo" { + Properties70: { + P: "ImageSequence", "bool", "", "",0 + P: "ImageSequenceOffset", "int", "Integer", "",0 + P: "FrameRate", "double", "Number", "",0 + P: "LastFrame", "int", "Integer", "",0 + P: "Width", "int", "Integer", "",0 + P: "Height", "int", "Integer", "",0 + P: "Path", "KString", "XRefUrl", "", "" + P: "StartFrame", "int", "Integer", "",0 + P: "StopFrame", "int", "Integer", "",0 + P: "PlaySpeed", "double", "Number", "",0 + P: "Offset", "KTime", "Time", "",0 + P: "InterlaceMode", "enum", "", "",0 + P: "FreeRunning", "bool", "", "",0 + P: "Loop", "bool", "", "",0 + P: "AccessMode", "enum", "", "",0 + } + } + } +} + +; Object properties +;------------------------------------------------------------------ + +Objects: { + Geometry: 2450701965840, "Geometry::", "Mesh" { + Vertices: *12 { + a: 1.25331282615662,-1.86103570461273,0,-0.067808598279953,-1.86103570461273,0,-0.067808598279953,0.0457773506641388,0,1.25331282615662,0.0457773506641388,0 + } + PolygonVertexIndex: *4 { + a: 2,1,0,-4 + } + Edges: *4 { + a: 1,0,2,3 + } + GeometryVersion: 124 + LayerElementNormal: 0 { + Version: 101 + Name: "" + MappingInformationType: "ByVertice" + ReferenceInformationType: "Direct" + Normals: *12 { + a: 0,0,0.999999940395355,0,0,0.999999940395355,0,0,0.999999940395355,0,0,0.999999940395355 + } + } + LayerElementUV: 0 { + Version: 101 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "IndexToDirect" + UV: *8 { + a: 0.809003710746765,0.0223051309585571,0.157322824001312,0.0223051309585571,0.157322824001312,0.962895095348358,0.809003710746765,0.962895095348358 + } + UVIndex: *4 { + a: 2,1,0,3 + } + } + LayerElementMaterial: 0 { + Version: 101 + Name: "" + MappingInformationType: "AllSame" + ReferenceInformationType: "IndexToDirect" + Materials: *1 { + a: 0 + } + } + Layer: 0 { + Version: 100 + LayerElement: { + Type: "LayerElementNormal" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementMaterial" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementUV" + TypedIndex: 0 + } + } + } + Model: 2450707864912, "Model::shl_csrPointer_geo", "Mesh" { + Version: 232 + Properties70: { + P: "RotationActive", "bool", "", "",1 + P: "InheritType", "enum", "", "",1 + P: "ScalingMax", "Vector3D", "Vector", "",0,0,0 + P: "DefaultAttributeIndex", "int", "Integer", "",0 + P: "currentUVSet", "KString", "", "U", "map1" + } + Shading: T + Culling: "CullingOff" + } + Material: 2486538784848, "Material::pasted__dx11Shader80", "" { + Version: 102 + ShadingModel: "unknown" + MultiLayer: 0 + Properties70: { + P: "Maya", "Compound", "", "" + P: "Maya|TypeId", "int", "Integer", "",528468 + P: "Maya|bSwatch", "bool", "", "",0 + P: "Maya|light1Enable", "bool", "", "",0 + P: "Maya|light0Enable", "bool", "", "",0 + P: "Maya|light0Type", "enum", "", "",2 + P: "Maya|light2Enable", "bool", "", "",0 + P: "Maya|light1Type", "enum", "", "",2 + P: "Maya|light0Pos", "matrix4x4", "Matrix Transformation", "",1,0,0,100,0,1,0,100,0,0,1,100,0,0,0,1 + P: "Maya|light1Pos", "matrix4x4", "Matrix Transformation", "",1,0,0,100,0,1,0,100,0,0,1,100,0,0,0,1 + P: "Maya|light2Type", "enum", "", "",2 + P: "Maya|light3Enable", "bool", "", "",0 + P: "Maya|light0Scale", "Vector3D", "Vector", "",1,1,1 + P: "Maya|light3Type", "enum", "", "",2 + P: "Maya|light1Scale", "Vector3D", "Vector", "",1,1,1 + P: "Maya|light4Enable", "bool", "", "",0 + P: "Maya|light2Pos", "matrix4x4", "Matrix Transformation", "",1,0,0,100,0,1,0,100,0,0,1,100,0,0,0,1 + P: "Maya|light0Color", "Vector3D", "Vector", "",1,1,1 + P: "Maya|light3Pos", "matrix4x4", "Matrix Transformation", "",1,0,0,100,0,1,0,100,0,0,1,100,0,0,0,1 + P: "Maya|light0Intensity", "float", "", "",1 + P: "Maya|light2Scale", "Vector3D", "Vector", "",1,1,1 + P: "Maya|light1Color", "Vector3D", "Vector", "",1,1,1 + P: "Maya|light4Type", "enum", "", "",2 + P: "Maya|light3Scale", "Vector3D", "Vector", "",1,1,1 + P: "Maya|light0Dir", "matrix4x4", "Matrix Transformation", "",1,0,-100,0,0,1,-100,0,0,0,-100,0,0,0,0,1 + P: "Maya|light2Color", "Vector3D", "Vector", "",1,1,1 + P: "Maya|light1Intensity", "float", "", "",1 + P: "Maya|light4Pos", "matrix4x4", "Matrix Transformation", "",1,0,0,100,0,1,0,100,0,0,1,100,0,0,0,1 + P: "Maya|light3Color", "Vector3D", "Vector", "",1,1,1 + P: "Maya|light2Intensity", "float", "", "",1 + P: "Maya|light0ConeAngle", "float", "", "",0.46 + P: "Maya|light1Dir", "matrix4x4", "Matrix Transformation", "",1,0,-100,0,0,1,-100,0,0,0,-100,0,0,0,0,1 + P: "Maya|light4Scale", "Vector3D", "Vector", "",1,1,1 + P: "Maya|light3Intensity", "float", "", "",1 + P: "Maya|light2Dir", "matrix4x4", "Matrix Transformation", "",1,0,-100,0,0,1,-100,0,0,0,-100,0,0,0,0,1 + P: "Maya|light1ConeAngle", "float", "", "",0.46 + P: "Maya|light4Color", "Vector3D", "Vector", "",1,1,1 + P: "Maya|light0FallOff", "float", "", "",0.7 + P: "Maya|light2ConeAngle", "float", "", "",0.46 + P: "Maya|light0AttenScale", "float", "", "",0 + P: "Maya|light1FallOff", "float", "", "",0.7 + P: "Maya|light3Dir", "matrix4x4", "Matrix Transformation", "",1,0,-100,0,0,1,-100,0,0,0,-100,0,0,0,0,1 + P: "Maya|light4Intensity", "float", "", "",1 + P: "Maya|light1AttenScale", "float", "", "",0 + P: "Maya|light2FallOff", "float", "", "",0.7 + P: "Maya|light3ConeAngle", "float", "", "",0.46 + P: "Maya|light0ShadowOn", "bool", "", "",1 + P: "Maya|light4Dir", "matrix4x4", "Matrix Transformation", "",1,0,-100,0,0,1,-100,0,0,0,-100,0,0,0,0,1 + P: "Maya|light2AttenScale", "float", "", "",0 + P: "Maya|light1ShadowOn", "bool", "", "",1 + P: "Maya|light3FallOff", "float", "", "",0.7 + P: "Maya|light4ConeAngle", "float", "", "",0.46 + P: "Maya|light2ShadowOn", "bool", "", "",1 + P: "Maya|light3AttenScale", "float", "", "",0 + P: "Maya|light4FallOff", "float", "", "",0.7 + P: "Maya|light3ShadowOn", "bool", "", "",1 + P: "Maya|light4AttenScale", "float", "", "",0 + P: "Maya|light4ShadowOn", "bool", "", "",1 + P: "Maya|cAlbedo", "Vector3D", "Vector", "",0.658731997013092,0.658731997013092,0.658731997013092 + P: "Maya|bEnableAlbedoMap", "bool", "", "",1 + P: "Maya|txAlbedo", "Vector3D", "Vector", "",0,0,0 + P: "Maya|bEnableVertexColor", "bool", "", "",0 + P: "Maya|bEnableAlpha", "bool", "", "",1 + P: "Maya|bEnableMrcAlpha", "bool", "", "",0 + P: "Maya|fAlphaScale", "float", "", "",1 + P: "Maya|txAlpha", "Vector3D", "Vector", "",0,0,0 + P: "Maya|cEmissive", "Vector3D", "Vector", "",0,0,0 + P: "Maya|vUVOffset", "Vector2D", "Vector2", "",0,0 + P: "Maya|vUVScale", "Vector2D", "Vector2", "",1,1 + P: "Maya|bEnableBackFaceCull", "bool", "", "",1 + } + } + Video: 2486351181648, "Video::pasted__file591", "Clip" { + Type: "Clip" + Properties70: { + P: "Path", "KString", "XRefUrl", "", "T:/PlatformNext/Analog/Design/Assets/Maya/shell_charlie/sourceimages/Cursor/Mouse/NormalCursor.png" + } + UseMipMap: 0 + Filename: "T:/PlatformNext/Analog/Design/Assets/Maya/shell_charlie/sourceimages/Cursor/Mouse/NormalCursor.png" + RelativeFilename: "T:\PlatformNext\Analog\Design\Assets\Maya\shell_charlie\sourceimages\Cursor\Mouse\NormalCursor.png" + } + Video: 2486351206448, "Video::pasted__file592", "Clip" { + Type: "Clip" + Properties70: { + P: "Path", "KString", "XRefUrl", "", "T:/PlatformNext/Analog/Design/Assets/Maya/shell_charlie/sourceimages/Cursor/Mouse/NormalCursor.png" + } + UseMipMap: 0 + Filename: "T:/PlatformNext/Analog/Design/Assets/Maya/shell_charlie/sourceimages/Cursor/Mouse/NormalCursor.png" + RelativeFilename: "T:\PlatformNext\Analog\Design\Assets\Maya\shell_charlie\sourceimages\Cursor\Mouse\NormalCursor.png" + } + Video: 2486351210848, "Video::root 16", "Clip" { + Type: "Clip" + Properties70: { + P: "Path", "KString", "XRefUrl", "", "T:/PlatformNext/Analog/Design/Code/BExport/MayaHLSL/EmissiveMaterial.fx" + } + UseMipMap: 0 + Filename: "T:/PlatformNext/Analog/Design/Code/BExport/MayaHLSL/EmissiveMaterial.fx" + RelativeFilename: "T:\PlatformNext\Analog\Design\Code\BExport\MayaHLSL\EmissiveMaterial.fx" + } + Texture: 2486581320752, "Texture::pasted__file591", "" { + Type: "TextureVideoClip" + Version: 202 + TextureName: "Texture::pasted__file591" + Properties70: { + P: "UseMaterial", "bool", "", "",1 + } + Media: "Video::pasted__file591" + FileName: "T:/PlatformNext/Analog/Design/Assets/Maya/shell_charlie/sourceimages/Cursor/Mouse/NormalCursor.png" + RelativeFilename: "T:\PlatformNext\Analog\Design\Assets\Maya\shell_charlie\sourceimages\Cursor\Mouse\NormalCursor.png" + ModelUVTranslation: 0,0 + ModelUVScaling: 1,1 + Texture_Alpha_Source: "None" + Cropping: 0,0,0,0 + } + Texture: 2486581321232, "Texture::pasted__file592", "" { + Type: "TextureVideoClip" + Version: 202 + TextureName: "Texture::pasted__file592" + Properties70: { + P: "UseMaterial", "bool", "", "",1 + } + Media: "Video::pasted__file592" + FileName: "T:/PlatformNext/Analog/Design/Assets/Maya/shell_charlie/sourceimages/Cursor/Mouse/NormalCursor.png" + RelativeFilename: "T:\PlatformNext\Analog\Design\Assets\Maya\shell_charlie\sourceimages\Cursor\Mouse\NormalCursor.png" + ModelUVTranslation: 0,0 + ModelUVScaling: 1,1 + Texture_Alpha_Source: "None" + Cropping: 0,0,0,0 + } + Implementation: 2450526545136, "Implementation::pasted__dx11Shader80_Implementation", "" { + Version: 100 + Properties70: { + P: "ShaderLanguage", "KString", "", "", "HLSL" + P: "ShaderLanguageVersion", "KString", "", "", "5.0" + P: "RenderAPI", "KString", "", "", "DirectX" + P: "RenderAPIVersion", "KString", "", "", "11.0" + P: "RootBindingName", "KString", "", "", "root" + } + } + BindingTable: 2450526226096, "BindingTable::root 16", "" { + Version: 100 + Properties70: { + P: "TargetName", "KString", "", "", "root" + P: "TargetType", "KString", "", "", "shader" + P: "DescAbsoluteURL", "KString", "XRefUrl", "", "T:/PlatformNext/Analog/Design/Code/BExport/MayaHLSL/EmissiveMaterial.fx" + P: "DescTAG", "KString", "", "", "Emissive_Over" + } + Entry: "Maya|light3Scale", "FbxPropertyEntry", "light3Scale", "FbxSemanticEntry" + Entry: "Maya|light1Pos", "FbxPropertyEntry", "light1Pos", "FbxSemanticEntry" + Entry: "Maya|fAlphaScale", "FbxPropertyEntry", "fAlphaScale", "FbxSemanticEntry" + Entry: "Maya|light2ConeAngle", "FbxPropertyEntry", "light2ConeAngle", "FbxSemanticEntry" + Entry: "Maya|light0Pos", "FbxPropertyEntry", "light0Pos", "FbxSemanticEntry" + Entry: "Maya|light2FallOff", "FbxPropertyEntry", "light2FallOff", "FbxSemanticEntry" + Entry: "Maya|light1Dir", "FbxPropertyEntry", "light1Dir", "FbxSemanticEntry" + Entry: "Maya|light1Intensity", "FbxPropertyEntry", "light1Intensity", "FbxSemanticEntry" + Entry: "Maya|light2Type", "FbxPropertyEntry", "light2Type", "FbxSemanticEntry" + Entry: "Maya|light3ConeAngle", "FbxPropertyEntry", "light3ConeAngle", "FbxSemanticEntry" + Entry: "Maya|light0AttenScale", "FbxPropertyEntry", "light0AttenScale", "FbxSemanticEntry" + Entry: "Maya|light1Color", "FbxPropertyEntry", "light1Color", "FbxSemanticEntry" + Entry: "Maya|vUVScale", "FbxPropertyEntry", "vUVScale", "FbxSemanticEntry" + Entry: "Maya|txAlbedo", "FbxPropertyEntry", "txAlbedo", "FbxSemanticEntry" + Entry: "Maya|light0ShadowOn", "FbxPropertyEntry", "light0ShadowOn", "FbxSemanticEntry" + Entry: "Maya|light1Scale", "FbxPropertyEntry", "light1Scale", "FbxSemanticEntry" + Entry: "Maya|light1Type", "FbxPropertyEntry", "light1Type", "FbxSemanticEntry" + Entry: "Maya|bEnableVertexColor", "FbxPropertyEntry", "bEnableVertexColor", "FbxSemanticEntry" + Entry: "Maya|light3Dir", "FbxPropertyEntry", "light3Dir", "FbxSemanticEntry" + Entry: "Maya|light2Color", "FbxPropertyEntry", "light2Color", "FbxSemanticEntry" + Entry: "Maya|light1FallOff", "FbxPropertyEntry", "light1FallOff", "FbxSemanticEntry" + Entry: "Maya|light0Type", "FbxPropertyEntry", "light0Type", "FbxSemanticEntry" + Entry: "Maya|light4Intensity", "FbxPropertyEntry", "light4Intensity", "FbxSemanticEntry" + Entry: "Maya|light4Pos", "FbxPropertyEntry", "light4Pos", "FbxSemanticEntry" + Entry: "Maya|light0Scale", "FbxPropertyEntry", "light0Scale", "FbxSemanticEntry" + Entry: "Maya|light2Dir", "FbxPropertyEntry", "light2Dir", "FbxSemanticEntry" + Entry: "Maya|light3ShadowOn", "FbxPropertyEntry", "light3ShadowOn", "FbxSemanticEntry" + Entry: "Maya|light2ShadowOn", "FbxPropertyEntry", "light2ShadowOn", "FbxSemanticEntry" + Entry: "Maya|light1AttenScale", "FbxPropertyEntry", "light1AttenScale", "FbxSemanticEntry" + Entry: "Maya|light4Enable", "FbxPropertyEntry", "light4Enable", "FbxSemanticEntry" + Entry: "Maya|light0Enable", "FbxPropertyEntry", "light0Enable", "FbxSemanticEntry" + Entry: "Maya|txAlpha", "FbxPropertyEntry", "txAlpha", "FbxSemanticEntry" + Entry: "Maya|bEnableBackFaceCull", "FbxPropertyEntry", "bEnableBackFaceCull", "FbxSemanticEntry" + Entry: "Maya|cAlbedo", "FbxPropertyEntry", "cAlbedo", "FbxSemanticEntry" + Entry: "Maya|light4Dir", "FbxPropertyEntry", "light4Dir", "FbxSemanticEntry" + Entry: "Maya|light4Type", "FbxPropertyEntry", "light4Type", "FbxSemanticEntry" + Entry: "Maya|light3Pos", "FbxPropertyEntry", "light3Pos", "FbxSemanticEntry" + Entry: "Maya|light4ShadowOn", "FbxPropertyEntry", "light4ShadowOn", "FbxSemanticEntry" + Entry: "Maya|light0Dir", "FbxPropertyEntry", "light0Dir", "FbxSemanticEntry" + Entry: "Maya|light2AttenScale", "FbxPropertyEntry", "light2AttenScale", "FbxSemanticEntry" + Entry: "Maya|light3Enable", "FbxPropertyEntry", "light3Enable", "FbxSemanticEntry" + Entry: "Maya|bSwatch", "FbxPropertyEntry", "bSwatch", "FbxSemanticEntry" + Entry: "Maya|light1Enable", "FbxPropertyEntry", "light1Enable", "FbxSemanticEntry" + Entry: "Maya|light3FallOff", "FbxPropertyEntry", "light3FallOff", "FbxSemanticEntry" + Entry: "Maya|light2Intensity", "FbxPropertyEntry", "light2Intensity", "FbxSemanticEntry" + Entry: "Maya|light2Pos", "FbxPropertyEntry", "light2Pos", "FbxSemanticEntry" + Entry: "Maya|bEnableMrcAlpha", "FbxPropertyEntry", "bEnableMrcAlpha", "FbxSemanticEntry" + Entry: "Maya|light4Color", "FbxPropertyEntry", "light4Color", "FbxSemanticEntry" + Entry: "Maya|light1ConeAngle", "FbxPropertyEntry", "light1ConeAngle", "FbxSemanticEntry" + Entry: "Maya|light0Intensity", "FbxPropertyEntry", "light0Intensity", "FbxSemanticEntry" + Entry: "Maya|light3Intensity", "FbxPropertyEntry", "light3Intensity", "FbxSemanticEntry" + Entry: "Maya|light2Enable", "FbxPropertyEntry", "light2Enable", "FbxSemanticEntry" + Entry: "Maya|cEmissive", "FbxPropertyEntry", "cEmissive", "FbxSemanticEntry" + Entry: "Maya|vUVOffset", "FbxPropertyEntry", "vUVOffset", "FbxSemanticEntry" + Entry: "Maya|bEnableAlbedoMap", "FbxPropertyEntry", "bEnableAlbedoMap", "FbxSemanticEntry" + Entry: "Maya|light0FallOff", "FbxPropertyEntry", "light0FallOff", "FbxSemanticEntry" + Entry: "Maya|light0ConeAngle", "FbxPropertyEntry", "light0ConeAngle", "FbxSemanticEntry" + Entry: "Maya|light2Scale", "FbxPropertyEntry", "light2Scale", "FbxSemanticEntry" + Entry: "Maya|light4ConeAngle", "FbxPropertyEntry", "light4ConeAngle", "FbxSemanticEntry" + Entry: "Maya|light4Scale", "FbxPropertyEntry", "light4Scale", "FbxSemanticEntry" + Entry: "Maya|bEnableAlpha", "FbxPropertyEntry", "bEnableAlpha", "FbxSemanticEntry" + Entry: "Maya|light1ShadowOn", "FbxPropertyEntry", "light1ShadowOn", "FbxSemanticEntry" + Entry: "Maya|light4FallOff", "FbxPropertyEntry", "light4FallOff", "FbxSemanticEntry" + Entry: "Maya|light3AttenScale", "FbxPropertyEntry", "light3AttenScale", "FbxSemanticEntry" + Entry: "Maya|light0Color", "FbxPropertyEntry", "light0Color", "FbxSemanticEntry" + Entry: "Maya|light3Type", "FbxPropertyEntry", "light3Type", "FbxSemanticEntry" + Entry: "Maya|light4AttenScale", "FbxPropertyEntry", "light4AttenScale", "FbxSemanticEntry" + Entry: "Maya|light3Color", "FbxPropertyEntry", "light3Color", "FbxSemanticEntry" + } + Container: 2450701602592, "Container::BExport_StateExport", "Container" { + Version: 100 + } + Container: 2450701599888, "Container::BExport_StateExport1", "Container" { + Version: 100 + } +} + +; Object connections +;------------------------------------------------------------------ + +Connections: { + + ;Model::shl_csrPointer_geo, Model::RootNode + C: "OO",2450707864912,0 + + ;AnimLayer::BaseLayer, AnimStack::Take 001 + C: "OO",2450453935088,2450701596144 + + ;Texture::pasted__file591, Material::pasted__dx11Shader80 + C: "OP",2486581320752,2486538784848, "Maya|txAlbedo" + + ;Texture::pasted__file592, Material::pasted__dx11Shader80 + C: "OP",2486581321232,2486538784848, "Maya|txAlpha" + + ;Material::pasted__dx11Shader80, Implementation::pasted__dx11Shader80_Implementation + C: "OO",2486538784848,2450526545136 + + ;BindingTable::root 16, Implementation::pasted__dx11Shader80_Implementation + C: "OO",2450526226096,2450526545136 + + ;Video::root 16, BindingTable::root 16 + C: "OP",2486351210848,2450526226096, "DescAbsoluteURL" + + ;Video::pasted__file591, Texture::pasted__file591 + C: "OO",2486351181648,2486581320752 + + ;Video::pasted__file592, Texture::pasted__file592 + C: "OO",2486351206448,2486581321232 + + ;Geometry::, Model::shl_csrPointer_geo + C: "OO",2450701965840,2450707864912 + + ;Material::pasted__dx11Shader80, Model::shl_csrPointer_geo + C: "OO",2486538784848,2450707864912 +} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx.meta new file mode 100644 index 00000000000..0d2cd949832 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx.meta @@ -0,0 +1,102 @@ +fileFormatVersion: 2 +guid: 555e9d637afc1bb4588b164af67be209 +ModelImporter: + serializedVersion: 23 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2100000: pasted__dx11Shader80 + 2300000: //RootNode + 3300000: //RootNode + 4300000: shl_csrPointer_geo + externalObjects: + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: pasted__dx11Shader80 + second: {fileID: 2100000, guid: 2137afd1049cf61428db6f7025881422, type: 2} + 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 + useSRGBMaterialColor: 1 + 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 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + 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.SDK/Features/UX/Meshes/Cursors/Cursor_MoveArrows_geo.fbx b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MoveArrows_geo.fbx new file mode 100644 index 0000000000000000000000000000000000000000..ff151bd8a863491778f5f6c9f49e8af023165f8f GIT binary patch literal 20720 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 maO%zzweu$bLY%FGygf~%$YOi zStLT4m8{e$-9m?qb{nG7D0NwGZgwx&MYglE8`IdX#?+Gf4i%Kif-WS}AZYX|t;WDQ z+Ox6|E1R3Tjudq07=E*Xo!v?+y`88x?*|4BTIts;M3bb;$}kXKd{%}Kj&9waVx470 ziy)n#6nm=D1%*MGp5elnl=JGqr!FKG2UzLUaEzeTh5zngXE)YLk490XjEX*J0rE6tgDSXVo~ zKuw}lYPCu)b==6W66j+|CqwAQdN_y**6I|UsR34`2#)YX8KX9)sx*4H${WwMm1|{Z;u?0nMrBkDLl|d~ifWFL17YBtg z@iigIAa>eirPI@aMnf8D8$g$=^l^+3vZiQt$$GJuBa=%myknd&S%p0*_UdJ&mqU;? zJzda9OkvU*Qx_|)qG^myn<3~7Dnak-b)HSZwLgYI*~chg>cQG1BW4<*Q!8kH*+nP} zI+Z3>0U^ z#{z^BP1%eJg)Zs8G3!D$9XF`X;+*2Fu*ztiiZ+H)Et)8)H$!XGBunC<<5d~Ye&*3H zSd7jN%*aryl0@G&QqUxmO;~CTgUp!2o|Ztk9)?L(=%EdfoFhxj;Y#wCH6ym9A!LTy zWI;dCElQcC#NK`>Pd3NP<~d%pG6(axR;I!Dr@;Xw&Ulnm1>;8q|ylKO1HkjZgD`={U{F3@y}kPRHe>#U^FG{+{aiI{zU+0` zfsdD`S0C8HfNFNYVE>L{E@PRyU6?D<)3BlN0k_p(mUW#p~NA2NmbZ8z!`)pRZ}}mstl&583wBr zs-tkPc4iQ!Y?YySnNhHj%qVs8QzAo>@e`z_gTHouFm+&4i2<%089!!}I{A4=hGgM7 zal~>DUDt|LQTj~=)lcFPD~2OS2303#y`Wi2Tt>bb2+oM{ta|)&^r8@z$Wr%~tcJW}xrZh2Ff8^^7nR$P^p=M+#B``fvMWIoU zR!xk;&x%xB*boJTlbSJtaatpR)u6<+5hzumT+AITq$rJQLlB+%I;E8Z8MiDH&?Os_ z1f5$9h4mQ}t*RyqGiA{3W@zw=b2*BF1qF^oL1RoepUL6S^bfM(7JD7CV>r!f&?afs zH9=r|HN}Eb;==Wmst^uW6dGklv?f$X!dYVk1IEZu;4G1tiol2>L#d&=NS#4ce1zBp zu|xuWBk_aukqpd7Y6cjWN&?enSjF0My6`*rsuCHN%#wqQdV@Ay6fchAAR8=sk1un= z;2p_BD!?5kgg8-3-9*{|lC{Z$)LCpiS9o9Zcmzxom+Q!0EnpDE*XXLT@!8;d6l38K zYDkTFJg+Zj9P;y*bJ{3~!fk_iLIg1ob{l1fP#DRPgG6R5Yw>1NGBC+v0U_Rs+F6;s z+7Y%Kil9`3ieUf>y2VctqNO`NYy++N=1-jN8XM0Ux3I=m)ICt#dVv~MI@x2=#9AUX z>TErAXQFU5u?WP@F;1&B45wXdGHB}<)~+nGq9&&}Aw?kjND}nchT6T(ElSp-2{|ei z`B%Dc)nAnH&NXEUH^Lnw<97m#;ic7W<+Sr=BdbCOm^e4GFuRXx~Akd2Z7^Z79M zV`*=9sfl;OoL2Q!XuS*%28Ps}-G67r3+WkZ_y!y>p^2GT*<3bA>}l~+ z&5G4<`johIK2jBq0ugPjkwA4CJlUi8OP8S)CxOY!96g2|XIT7@i$EhK!h(9^v<4;C zH993lFBn9}Gm;J%t*%e7=+dN$0waR)gY-Djj|JL%l3`LuOoDTcPZFb=tbO7+-m85M zL=_Yc|1~+vWpjj^l$ll~Qr8E?szjgH2gRyHf67p}7n5!9XdS(v5VcZ+Ckn+A z4@z7sFG*FbGp=waK>=El5USNhs?t@4XpK6{nwD3{@GPEv;fylj8B{4L8bPlgU3ZK| z_Z#&D9b*e<2%aHQ;*!_J=_|H?=E^`V?k2HaaXT6*XzE7lJoqj{;=A19J_z@{^l;at zO9ZA*a6ZK2F&ZU4gUqkSX!VA_I>mcz3a;ZG(u}Y!%X6-Fr&=cCQ>F>d<6rQo3GDF_ z*Mzkhp4^?TVKZ<=bTcagXPAWyRz1(}HbYo-J0A2Z5vgu2toj_4jS#iC&`)iKuqsHA z%@9@v@oryT7hR<)OcVPnT$3i~R0c8PwGzY`We76&%VM9}ZTl3%;FcF==E8|chVd6n z+t*b>tYZS(Ec;FXi!v>UEH(kRDVZM45?D3towg!aHHQjY5v*E6fSaVII;5z@s%O}W zU{#8L+lpXSiryV0DfnW?N>$i2ZaBgOZMs0O5|b>VwXD?Y?9Zjb9H$KNLB0%m=RlFde1IsQVnS~E%D5H zLE0qssd_=$BzQOX+69*ux?X~3*9+1n!H?Ao(k8*(*n?cYqkYXQj?k0hXFPdJ4%DQo zZQIh5>H%nz(BIbs&?b=^c9CRk$V9a`iXn2ORy#4!z@LMO_aO2otwUu979kC`$%qW; zHltRInGAy~o;h%AH87?~(@v@B=Fy(6{URIMpW2XUDDDA<3#s%BX0kvpT<8NSgCb2y zUpE;uGPLv(0?@JtGC=IYbikRhK*Uoe_O2(;K&N6Nz9Q2k3z^p6g5n8%vJ8pnqS)`43?f4Vj=#< z^g%BPjKd;uL9%?5?nreOGi9}AcjLT2*OtY5p?}FBvD`>jpQc9%`m{-Gkkr-uTkUE3 zk8E;o%z>;QsTF+G{eE}(dq~#$R|d22r)X%n43a&-uff7` zTSM=Q6h>VNJqwLg;-d(I7aI;PEK@aGU)Ni@#Ha7WdXgTS5{Xrymn7mFE-T*~z;4-$ zg)*=%W-$1+DEf3k6{*Z(Pkd`QgMyh&@$E6h3;=zGq^tCLT2^TXf@SkZ6?HoH`3##& zYTpba3!V>zgNZ`WUFqgn$7vde+_V@Pl&&{m-8!(+k%w}T7n<*!DSn=VJz;0h+r^U|Fd)*;+aB)I)2G9p+Z#VDPn+Y^ zqUG$vMXqO@zMMEO^u4yd-ubF{Srr2?C#Owu+Z+*q&}2VC5= zsMV1E&PTGhmUd6P@9^Au|Nf5d7iLEp3SKzrJNlZZ`<^M!9T@)Vfr{kty(I^?4II60 zz=|&hP6%)=m^tu)y4AfsHw!K{+2(LYqtV^@&rdt2UJie!jsC1Q(_`nB*7@rm449HX z=JN$Pik&HKj~=MZYI4ZQ5Pj>Ngqb;x(a)_6m{Xl{=@n*v$IZox$^ox$0_+IPpR^hT?Sm-TRf|K zf9Lpa{jMIV%)hnpW{j))&L$6^2MLj>P2YEoS$3uU-uoZuR;-^{G~?Tl&3%5JzGYQx zkChI|3BAu3-A zahY`d+nh18-uZ4?t5uEmZuQzW{@kw2s%6F9Kfdjm{l~hgFHUURdg;0iOMY5=$>p9m)sYuyVB<3Chxm5#@)F+{fiCH{c^XeepG+wo?-u*x~=K7i^Kkr@`3iL!bgpT ziY%vV_6b$@2M#X#&h^{j0h@{skD2{p(`nz&cKPj>ssN(RvCGQao=Aj_TLQqY)jZrIoEf+dGn8@mn)i#KR(Cj5p$$` z(@kTWu4Rl?ot3K9VDAZ;;xh-;S++4VSRahR6N;Pk$N@BBRm7$@s16$4;76}h9W;({ zxVl2BgN7%>Tk~sF2aRVFc%yuk>Y(A4@l53k)j{LN5HA=nQynzUZoFjso$8?BSMaXt z64gQDz8r5|E>aydLNYhX7pM*zaa0G&1yl!(@UJ7~^Hc|o8;DMn&ruyTj^ECd&r%&U z&Np|;zfm1D4k8cAzfv7^E6QCcpP@Qvq}G)GLv@tU-D#pxLT{i^LT8{+LSLX!LRX+s zLQkMkLPwxcLO-BULN}mMLNB0ELMNb6x-l9hbb)r1&;w|c&;e+akRLQk$POAMYx#+z)ni24jQLF?Bq|XgYHWicJhGgp!-pVo!qB7XoO0z zlVYla_N5Fvxkq)-IKN;gcc~5<5Ab0pcc>29k236}i0YuR^> zw$iDg_%SPBF3Ngf?UA0N&^m+e9`WBpDbg1Ie=q*iCv-I=tD2)}H%J^|;vCC?)W-A? zsvHCc5UkSCr-$}3srSK_C^<-y>XR3fu|a>^=|ZOclBH2Y<73;riDlV&LQu{_o#Aw_3WCST|Y`$yx!~f+Rj~v=)1RA+a$1u%ZZPVu5szM_o-KR zJmc4`_iM3VeX%yLcvW%2j!wl>ubtiBHhbE&((}cu@(w$8*thw-HfrjffTKrNO#1Ej zwsViq+V7e2Y1x(u_cwiM95wIPBWE?6`lOW(4a=Gz5I@=fV)V-alg`~+aQjf~&3Wfn zefaIPijs5pH_R<=(C$=7<^K0dyIs;(rhPr(lzT(JLo>_YA2;gKfoad&?&ErWP47$1 zmp;5d{YLJT{TToLx63LE$L=fn;@w{QQ1tHVpDGoDes0kB z>HPtJPCJpK-&a0J_b4!K)ExcuUueHr+U&&oyel3RE$pXz9VsZ9(7w2ZL+OEO>h52ne zjBIxEr_YTM-@ch^h#A%CknWAIUQQTu>6oT491FjoicS zOLiStaQn!a%Byx)n%zj5;$GYYYwtN_kJ|g}TaAm$hA#Cf6Ibf+^4u;_(_h-{zu<_o zaj`?j$;u6+g6 zZWi_ksknH(c*W&T=azIbR)#;*YU905?S2W#S?+oF@Pj>{&bwzf?~~2`+WylI(p@KyqYzd{pvTs$r9Npqy!+G{J6$^Pdx5TipJc*~jmDEq4t)Jma`-!m`B; z>{>fCG*F+KQ&E`I4kRS*Zkt(p&=Dg=@A-|4C*IfOJp}@|AnSy42ubpuIOWon8Qz_S zh>a%q_XHj^MFxQb2Fbby#gQfkc=1}vkq!tJN0_+S!L;zyh>^)_=@P2=>jRng#zo#e zXT~-^;5pgw$uPgZ9$Sa`^~>(ivPpxtw|f6`Z|AMWle?>*Td?@uec!t!-q`MVeAtIA z_PKQoS@G7;HZK?MoKn?gcj5heWw$GfDyNkAcU)_@IAKRt!~IL5Uym~^JkwUFOkI^% zaDKa={+lcJ`b9r`FI%fRu)kkG!qw4vhrZcyb=JLcbH?fKr*8k~+pFd4=X~IL^t$fU zjcHZOQ=1JKuAh^im-3_Yi(mBK^!$UVA192}N0x{EkTAB-qx6QUr|?J0*5i%dZS7e^7LO(X~?FoamgK<@-G^y}fm(^UmBmuYdjh>+J???z7Hk#MR8( z=T_fel69r{)4c^V=RS&vSY0?jHF);xu?~I)BnN?!Nuq*nq-MX186M^TwP-FP{1!Z}!_s^CGGOcYTq3rtDLX z(&-a(67#nCXYQZ6rEtUP(l^`t$L4j+U$@yg?^52rbtRtuLD%y>Y`hX=;}w5MRsA3tt8)1$1ik@}5{XHUuOnTPofWW#u$ zSYvGe6spB6o!p9&^UGxYoQG^kH^sln#bR;bI?5A#(@qRaTCse7$0aJPooVq z%oec_kE^j05GSJzG>?;c?9Ah19y9Z}n8(U(X$<0E9wYNOn8(I$bgctr9us#Yx)W;y z-I=mGYXj{;xeIFpjRakx4JGu{m6gyDXq3M&+zz@I zWjN;^jP|4wF*({mds9XXjyBMJDEFm|HqiYjBgRG>XdYklxSPk*JkI9vGmonW(HMWq z2uVQ)P##PfZJ+}w51~Am(Lq!OQ$`!;5XzyH(FQt<@=(fX107Cz7-h79j-VV#8Ev4W zC=aKMHqg9F6-V*oWXin-3|GB`@ z{GHjVtgpcKD9LT1k+`a&xfo@tZ6uAbGnq>=H8{hbYe-EktuSAP1pk91{dpg(x@B)E zTKiKrhR^PVFPf9Zb4lb<1ghz0qb;1h#yW8|z#Ae-oZ&37HBzhI( zLayNa!trC>HQ3*h*YJf8E6gJR|*RB{y@eG z*NHj9>ytaOU4?wvmmql@hm&K>Q z10!|6kZ1jCcmsL5cIdj_q7(EQ@oS*Rh?iItz_|`#ToBieMDkA(p7iziVi`PQ8YF_p zj7%v{ihi$lbf%X&(XFUvAX{~A6<#9eCf=jz|NP+_xu>bQj+eb`U_FYp@lt2LWje93 z<}K4afo+-QbV>SBNw#NBGyeJZ<#JTpGmdc*GVfI9p7D|m;HdIF^EQ)!F>WfV?U^kM zj9cH|xM!M(e#7c^v}w+0AHLyusAeCez`+ z1Jl^dI*0I+&@^OYokO@MFb%0$T55G0S@Wev@ydyU-ho}^u7Izh1N$Q_%q(k$u-^J; v*G8wG51mThI;DJeyYk*fi=Oz~t^Zf);VbXFcK*ScoIkEN{oR<`t;zoYtQb}` literal 0 HcmV?d00001 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Press_geo.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Press_geo.fbx.meta new file mode 100644 index 00000000000..7efdf3099ae --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Press_geo.fbx.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: caf154e80e62ac7439f2b35a96114c28 +ModelImporter: + serializedVersion: 23 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2100000: Light + 2100002: Shadow + 2300000: //RootNode + 3300000: //RootNode + 4300000: Cursor_Press + externalObjects: + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: Light + second: {fileID: 2100000, guid: d7c7db2cf580ab94084f0561d16ded07, type: 2} + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: Shadow + second: {fileID: 2100000, guid: fc1b6cd8da653e3448dcdb722ada2ebc, type: 2} + 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 + useSRGBMaterialColor: 1 + 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 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + 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.SDK/Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx new file mode 100644 index 0000000000000000000000000000000000000000..e3ed71e3b77b96fcedaf1e26cd536ac3978a7151 GIT binary patch literal 21392 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 literal 0 HcmV?d00001 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx.meta new file mode 100644 index 00000000000..de82f1e5e3d --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: b57251626be6f304a83b681a561394eb +ModelImporter: + serializedVersion: 23 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2100000: Shadow + 2100002: Light + 2300000: //RootNode + 3300000: //RootNode + 4300000: Cursor_Unfocus + externalObjects: + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: Light + second: {fileID: 2100000, guid: d7c7db2cf580ab94084f0561d16ded07, type: 2} + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: Shadow + second: {fileID: 2100000, guid: fc1b6cd8da653e3448dcdb722ada2ebc, type: 2} + 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 + useSRGBMaterialColor: 1 + 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 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + 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.SDK/Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx new file mode 100644 index 0000000000000000000000000000000000000000..5c5e40bda82db25d11238473eaab4a9a3c7584b4 GIT binary patch literal 22272 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 VtlqPssOfn`O_gdXKYGTn{{^sN#i9TJ literal 0 HcmV?d00001 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx.meta new file mode 100644 index 00000000000..6310c6772b1 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: 1f927d8a23ccb6443b8eb9990f48070b +ModelImporter: + serializedVersion: 23 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2100000: Light + 2100002: Shadow + 2300000: //RootNode + 3300000: //RootNode + 4300000: Cursor_Rotate + externalObjects: + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: Light + second: {fileID: 2100000, guid: d7c7db2cf580ab94084f0561d16ded07, type: 2} + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: Shadow + second: {fileID: 2100000, guid: fc1b6cd8da653e3448dcdb722ada2ebc, type: 2} + 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 + useSRGBMaterialColor: 1 + 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 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + 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.SDK/Features/UX/Meshes/Cursors/Materials.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials.meta new file mode 100644 index 00000000000..b2a7da5302a --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: abe572db9d31c7f47b1cf04feea1c6ef +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Light.mat b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Light.mat new file mode 100644 index 00000000000..3fcb811bb53 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Light.mat @@ -0,0 +1,161 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Light + m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} + m_ShaderKeywords: _DIRECTIONAL_LIGHT _DISABLE_ALBEDO_MAP _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} + - _IridescentSpectrumMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + 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} + - _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} + m_Floats: + - _AlbedoAlphaMode: 0 + - _AlbedoAssignedAtRuntime: 0 + - _BlendOp: 0 + - _BorderLight: 0 + - _BorderLightOpaque: 0 + - _BorderLightOpaqueAlpha: 1 + - _BorderLightReplacesAlbedo: 0 + - _BorderLightUsesHoverColor: 0 + - _BorderMinValue: 0.1 + - _BorderWidth: 0.1 + - _BumpScale: 1 + - _ClippingBorder: 0 + - _ClippingBorderWidth: 0.025 + - _ClippingBox: 0 + - _ClippingPlane: 0 + - _ClippingSphere: 0 + - _ColorWriteMask: 15 + - _CullMode: 2 + - _CustomMode: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DirectionalLight: 1 + - _DstBlend: 0 + - _EdgeSmoothingValue: 0.002 + - _EnableChannelMap: 0 + - _EnableEmission: 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 + - _GlossyReflections: 1 + - _HoverLight: 1 + - _InnerGlow: 0 + - _InnerGlowPower: 4 + - _InstancedColor: 0 + - _Iridescence: 0 + - _IridescenceAngle: -0.78 + - _IridescenceIntensity: 0.5 + - _IridescenceThreshold: 0.05 + - _Metallic: 0 + - _Mode: 0 + - _NearLightFade: 0 + - _NearPlaneFade: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ProximityLight: 0 + - _ProximityLightTwoSided: 0 + - _Reflections: 1 + - _Refraction: 0 + - _RefractiveIndex: 0 + - _RenderQueueOverride: -1 + - _RimLight: 0 + - _RimPower: 0.25 + - _RoundCornerMargin: 0.01 + - _RoundCornerRadius: 0.25 + - _RoundCorners: 0 + - _Smoothness: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SphericalHarmonics: 0 + - _SrcBlend: 1 + - _Stencil: 0 + - _StencilComparison: 0 + - _StencilOperation: 0 + - _StencilReference: 0 + - _TriplanarMappingBlendSharpness: 4 + - _UVSec: 0 + - _VertexColors: 0 + - _ZTest: 4 + - _ZWrite: 1 + m_Colors: + - _ClippingBorderColor: {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: 0} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 0} + - _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} + - _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} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Light.mat.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Light.mat.meta new file mode 100644 index 00000000000..3947aaeb4bf --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Light.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d7c7db2cf580ab94084f0561d16ded07 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/MousePointer.mat b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/MousePointer.mat new file mode 100644 index 00000000000..6f864f88075 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/MousePointer.mat @@ -0,0 +1,160 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MousePointer + m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} + m_ShaderKeywords: _ALPHATEST_ON _DIRECTIONAL_LIGHT _HOVER_LIGHT _REFLECTIONS _SPECULAR_HIGHLIGHTS + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2450 + stringTagMap: + RenderType: TransparentCutout + 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} + - _IridescentSpectrumMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 291b0378706ecbe45b8dad41f9b226c2, 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} + - _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} + m_Floats: + - _AlbedoAlphaMode: 0 + - _AlbedoAssignedAtRuntime: 0 + - _BlendOp: 0 + - _BorderLight: 0 + - _BorderLightOpaque: 0 + - _BorderLightOpaqueAlpha: 1 + - _BorderLightReplacesAlbedo: 0 + - _BorderLightUsesHoverColor: 0 + - _BorderMinValue: 0.1 + - _BorderWidth: 0.1 + - _BumpScale: 1 + - _ClippingBorder: 0 + - _ClippingBorderWidth: 0.025 + - _ClippingBox: 0 + - _ClippingPlane: 0 + - _ClippingSphere: 0 + - _ColorWriteMask: 15 + - _CullMode: 2 + - _CustomMode: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DirectionalLight: 1 + - _DstBlend: 0 + - _EdgeSmoothingValue: 0.002 + - _EnableChannelMap: 0 + - _EnableEmission: 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 + - _GlossyReflections: 1 + - _HoverLight: 1 + - _InnerGlow: 0 + - _InnerGlowPower: 4 + - _InstancedColor: 0 + - _Iridescence: 0 + - _IridescenceAngle: -0.78 + - _IridescenceIntensity: 0.5 + - _IridescenceThreshold: 0.05 + - _Metallic: 0 + - _Mode: 1 + - _NearLightFade: 0 + - _NearPlaneFade: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ProximityLight: 0 + - _ProximityLightTwoSided: 0 + - _Reflections: 1 + - _Refraction: 0 + - _RefractiveIndex: 0 + - _RenderQueueOverride: -1 + - _RimLight: 0 + - _RimPower: 0.25 + - _RoundCornerMargin: 0.01 + - _RoundCornerRadius: 0.25 + - _RoundCorners: 0 + - _Smoothness: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SphericalHarmonics: 0 + - _SrcBlend: 1 + - _Stencil: 0 + - _StencilComparison: 0 + - _StencilOperation: 0 + - _StencilReference: 0 + - _TriplanarMappingBlendSharpness: 4 + - _UVSec: 0 + - _VertexColors: 0 + - _ZTest: 4 + - _ZWrite: 1 + m_Colors: + - _ClippingBorderColor: {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: 0} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 0} + - _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} + - _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} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/MousePointer.mat.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/MousePointer.mat.meta new file mode 100644 index 00000000000..20dfde6618d --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/MousePointer.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2137afd1049cf61428db6f7025881422 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/SHADOW_PBR.mat b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/SHADOW_PBR.mat new file mode 100644 index 00000000000..d6d0404ead1 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/SHADOW_PBR.mat @@ -0,0 +1,161 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SHADOW_PBR + m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} + m_ShaderKeywords: _DIRECTIONAL_LIGHT _DISABLE_ALBEDO_MAP _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} + - _IridescentSpectrumMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + 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} + - _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} + m_Floats: + - _AlbedoAlphaMode: 0 + - _AlbedoAssignedAtRuntime: 0 + - _BlendOp: 0 + - _BorderLight: 0 + - _BorderLightOpaque: 0 + - _BorderLightOpaqueAlpha: 1 + - _BorderLightReplacesAlbedo: 0 + - _BorderLightUsesHoverColor: 0 + - _BorderMinValue: 0.1 + - _BorderWidth: 0.1 + - _BumpScale: 1 + - _ClippingBorder: 0 + - _ClippingBorderWidth: 0.025 + - _ClippingBox: 0 + - _ClippingPlane: 0 + - _ClippingSphere: 0 + - _ColorWriteMask: 15 + - _CullMode: 2 + - _CustomMode: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DirectionalLight: 1 + - _DstBlend: 0 + - _EdgeSmoothingValue: 0.002 + - _EnableChannelMap: 0 + - _EnableEmission: 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 + - _GlossyReflections: 1 + - _HoverLight: 1 + - _InnerGlow: 0 + - _InnerGlowPower: 4 + - _InstancedColor: 0 + - _Iridescence: 0 + - _IridescenceAngle: -0.78 + - _IridescenceIntensity: 0.5 + - _IridescenceThreshold: 0.05 + - _Metallic: 0 + - _Mode: 0 + - _NearLightFade: 0 + - _NearPlaneFade: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ProximityLight: 0 + - _ProximityLightTwoSided: 0 + - _Reflections: 1 + - _Refraction: 0 + - _RefractiveIndex: 0 + - _RenderQueueOverride: -1 + - _RimLight: 0 + - _RimPower: 0.25 + - _RoundCornerMargin: 0.01 + - _RoundCornerRadius: 0.25 + - _RoundCorners: 0 + - _Smoothness: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SphericalHarmonics: 0 + - _SrcBlend: 1 + - _Stencil: 0 + - _StencilComparison: 0 + - _StencilOperation: 0 + - _StencilReference: 0 + - _TriplanarMappingBlendSharpness: 4 + - _UVSec: 0 + - _VertexColors: 0 + - _ZTest: 4 + - _ZWrite: 1 + m_Colors: + - _ClippingBorderColor: {r: 1, g: 0.2, b: 0, a: 1} + - _Color: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 0} + - _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} + - _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} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/SHADOW_PBR.mat.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/SHADOW_PBR.mat.meta new file mode 100644 index 00000000000..eaba0179e73 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/SHADOW_PBR.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2a9146bd9eaa03440aa3a2acab574512 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Shadow.mat b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Shadow.mat new file mode 100644 index 00000000000..b5482d3243d --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Shadow.mat @@ -0,0 +1,161 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Shadow + m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} + m_ShaderKeywords: _DIRECTIONAL_LIGHT _DISABLE_ALBEDO_MAP _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} + - _IridescentSpectrumMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + 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} + - _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} + m_Floats: + - _AlbedoAlphaMode: 0 + - _AlbedoAssignedAtRuntime: 0 + - _BlendOp: 0 + - _BorderLight: 0 + - _BorderLightOpaque: 0 + - _BorderLightOpaqueAlpha: 1 + - _BorderLightReplacesAlbedo: 0 + - _BorderLightUsesHoverColor: 0 + - _BorderMinValue: 0.1 + - _BorderWidth: 0.1 + - _BumpScale: 1 + - _ClippingBorder: 0 + - _ClippingBorderWidth: 0.025 + - _ClippingBox: 0 + - _ClippingPlane: 0 + - _ClippingSphere: 0 + - _ColorWriteMask: 15 + - _CullMode: 2 + - _CustomMode: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DirectionalLight: 1 + - _DstBlend: 0 + - _EdgeSmoothingValue: 0.002 + - _EnableChannelMap: 0 + - _EnableEmission: 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 + - _GlossyReflections: 1 + - _HoverLight: 1 + - _InnerGlow: 0 + - _InnerGlowPower: 4 + - _InstancedColor: 0 + - _Iridescence: 0 + - _IridescenceAngle: -0.78 + - _IridescenceIntensity: 0.5 + - _IridescenceThreshold: 0.05 + - _Metallic: 0 + - _Mode: 0 + - _NearLightFade: 0 + - _NearPlaneFade: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ProximityLight: 0 + - _ProximityLightTwoSided: 0 + - _Reflections: 1 + - _Refraction: 0 + - _RefractiveIndex: 0 + - _RenderQueueOverride: -1 + - _RimLight: 0 + - _RimPower: 0.25 + - _RoundCornerMargin: 0.01 + - _RoundCornerRadius: 0.25 + - _RoundCorners: 0 + - _Smoothness: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SphericalHarmonics: 0 + - _SrcBlend: 1 + - _Stencil: 0 + - _StencilComparison: 0 + - _StencilOperation: 0 + - _StencilReference: 0 + - _TriplanarMappingBlendSharpness: 4 + - _UVSec: 0 + - _VertexColors: 0 + - _ZTest: 4 + - _ZWrite: 1 + m_Colors: + - _ClippingBorderColor: {r: 1, g: 0.2, b: 0, a: 1} + - _Color: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 0} + - _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} + - _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} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Shadow.mat.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Shadow.mat.meta new file mode 100644 index 00000000000..e487b087efb --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/Shadow.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fc1b6cd8da653e3448dcdb722ada2ebc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/ibeam_dx.mat b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/ibeam_dx.mat new file mode 100644 index 00000000000..9ca778a28d0 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/ibeam_dx.mat @@ -0,0 +1,161 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ibeam_dx + m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3} + m_ShaderKeywords: _DIRECTIONAL_LIGHT _DISABLE_ALBEDO_MAP _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} + - _IridescentSpectrumMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + 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} + - _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} + m_Floats: + - _AlbedoAlphaMode: 0 + - _AlbedoAssignedAtRuntime: 0 + - _BlendOp: 0 + - _BorderLight: 0 + - _BorderLightOpaque: 0 + - _BorderLightOpaqueAlpha: 1 + - _BorderLightReplacesAlbedo: 0 + - _BorderLightUsesHoverColor: 0 + - _BorderMinValue: 0.1 + - _BorderWidth: 0.1 + - _BumpScale: 1 + - _ClippingBorder: 0 + - _ClippingBorderWidth: 0.025 + - _ClippingBox: 0 + - _ClippingPlane: 0 + - _ClippingSphere: 0 + - _ColorWriteMask: 15 + - _CullMode: 2 + - _CustomMode: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DirectionalLight: 1 + - _DstBlend: 0 + - _EdgeSmoothingValue: 0.002 + - _EnableChannelMap: 0 + - _EnableEmission: 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 + - _GlossyReflections: 1 + - _HoverLight: 1 + - _InnerGlow: 0 + - _InnerGlowPower: 4 + - _InstancedColor: 0 + - _Iridescence: 0 + - _IridescenceAngle: -0.78 + - _IridescenceIntensity: 0.5 + - _IridescenceThreshold: 0.05 + - _Metallic: 0 + - _Mode: 0 + - _NearLightFade: 0 + - _NearPlaneFade: 0 + - _NormalMapScale: 1 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ProximityLight: 0 + - _ProximityLightTwoSided: 0 + - _Reflections: 1 + - _Refraction: 0 + - _RefractiveIndex: 0 + - _RenderQueueOverride: -1 + - _RimLight: 0 + - _RimPower: 0.25 + - _RoundCornerMargin: 0.01 + - _RoundCornerRadius: 0.25 + - _RoundCorners: 0 + - _Smoothness: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SphericalHarmonics: 0 + - _SrcBlend: 1 + - _Stencil: 0 + - _StencilComparison: 0 + - _StencilOperation: 0 + - _StencilReference: 0 + - _TriplanarMappingBlendSharpness: 4 + - _UVSec: 0 + - _VertexColors: 0 + - _ZTest: 4 + - _ZWrite: 1 + m_Colors: + - _ClippingBorderColor: {r: 1, g: 0.2, b: 0, a: 1} + - _Color: {r: 0.2, g: 0.2, b: 0.2, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 0} + - _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} + - _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} diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/ibeam_dx.mat.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/ibeam_dx.mat.meta new file mode 100644 index 00000000000..41175a98f7e --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Materials/ibeam_dx.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6c3b7f943cb15914d9f5f3b8da2c121b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures.meta new file mode 100644 index 00000000000..815f2649abb --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 13c93147e9fe9ac46a709cb2f98a540d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_MousePointer_tex.png b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_MousePointer_tex.png new file mode 100644 index 0000000000000000000000000000000000000000..4d088368003cdc84261504b6c7c0db1747d670c0 GIT binary patch literal 20502 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 literal 0 HcmV?d00001 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_MousePointer_tex.png.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_MousePointer_tex.png.meta new file mode 100644 index 00000000000..4e8db14949c --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_MousePointer_tex.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 291b0378706ecbe45b8dad41f9b226c2 +TextureImporter: + fileIDToRecycleName: {} + 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: 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.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Move_Shadow.png b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Move_Shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..12a00dc4b79ccfd2e36227acbe4ee79e41af1e9b GIT binary patch literal 1510 zcmV;{DQO$$wiR2lCF^8{owuGhFi4RiK{HeB3`Q4;-S-x| zSOO4svXh+t?*=#dbL03Z0o+s^^~3E(9^AM*NZ0N+SR&qE}U6C`&+9;MJa5Nhm`=)!@~p+DO=zfKcGou3AXghJeuE)wbXy6eXZ8@M>RB5{eK| zH+Z!%7zud^cqs5{XAlzd5b)68)z->M*hD~6z^lELl8{9})4;3Em64D}KvTi1-Ib8w zBcSQv)%MaPxCHzx;7v-C;1bX#pgpe8G#R`}UJ|@S=!%eezRv}UUkUcK!Qf4Lw8@oN z+FIV*%F-PHE%E+7m#TjU@QSNArws;g;*t=H$CuJpN`{Vrj>r42*qRRBL`jGVHraHU zaZOP-U6SAKazL9)R0mwFd_m8@;WG9!E?_npyou$6m5?yw-h=Ku{r9_@10vph%pIJh zo%{rzccn*%O$5g=u|>MbnP870&~F5+ViM7I!x0f%N0;7p10r@3hfN*V zC5$M$!&~y#<*u1_PtfF}v#mhm#;j?E_kms==Th3hTvSBDgpOWHmrmK$PQXf2?H zkcL2?m7oouHowao3JcFJj-3(6BfcUgF0g(v;%?Jt0Pop80Qkz^ZfW0Lhb?JsDT?$k z0~kk}NU-TQw7dk&N#tCnt~f_B9?|m#{%-*PkdOAER!}DIwTELK1UV zR5B%in7|_^=VZxRh_va;2x&RHN@?K#1@MmTjNZQz@81gnCBRJ>I!mOHFcKw~G<+%d z4GI!)%|5Q!l!R`IejoVvJacdi@uae<$FF#BvY3kAO`i=u|l(;hT-{0B)f+K2}qW=@y zSKgBeK8pY!3Ho3$BEth-J7t{Ob%*>dQ~3so9m36&CUefn)A%&FI>|5_@(T>A5z5mF=8k^rw{T2zt_I0C9T?HPMWxZ!U;{WH&L z(@e>GNGg^GiY1k`WnQ;wu`AiX%CkJ~?6XYKzw$lsR6ziwQ!@rqE2uJ`=eNxPuI`mM zAWeTEUE3U!%Tg9Qt<2uNuOf{da!Zf0yrpRoQBM_$N0BP}$R$-1poY&_zgu=*7U*Xw z8GXXOf{;-4Nzt`Tl@pnpPgt9u1JOpnT-E`G z&Inkg=-gUDi~xOziTQrS2baF*{{Sj$*~!raI&l{>tCA4^8PY#U*&c&6Jq_*~0dBEl zZ4v5^RH6PfAH-1;vy4BinE(I) M07*qoM6N<$g7AyTVgLXD literal 0 HcmV?d00001 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Move_Shadow.png.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Move_Shadow.png.meta new file mode 100644 index 00000000000..048fe241b44 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Move_Shadow.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 7d4ad91e1389b894684e74a0b97d25e7 +TextureImporter: + fileIDToRecycleName: {} + 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: 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.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Ring_Shadow.png b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Ring_Shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..abf40fd2aef3f667e115d9282059ffe2b2a48070 GIT binary patch literal 5192 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 bV^~Q9i3M%nMA_X8VE|Q##^cII<{|$BrtQoh literal 0 HcmV?d00001 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Ring_Shadow.png.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Ring_Shadow.png.meta new file mode 100644 index 00000000000..5be0a316f80 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Ring_Shadow.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 5594253527100df43a615c542bf0aaa7 +TextureImporter: + fileIDToRecycleName: {} + 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: 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.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Rotate_Shadow.png b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Textures/Cursor_Rotate_Shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..5a22f3b39db458336683df2ef6905018e8877455 GIT binary patch literal 1691 zcmV;M24wk(P)1HffrLveh?|N6FdeWHzoEGQJMp1$%}bW%n3n)A zV-!g|a@Q5*xQ@?71FvGw>-qb-6O_WqmH)Li>hNZwjNi;fv8uLo3LKTvFxQxc_J%EtT+)e6s&mw<@s?g1*V3M^xc z&)g}}RJn}r8_yc^5Rg`PGx$0+MUv~sxMnClbT*oN^JHltvApMydce=(_XqDfxiH7*7{LVn+jg)yrPx8iu-j(ey(EBOzA-TZG4|$ zUMH}EvhM4=-Fcn`o60k^s?@M)K~PGRnE zxWKN<7el6G@^=9LF9;aHEw!;S10nAr!0uK*KO=1sCq>KfAhVkU6 z$3KI%2WXz&5%_C-@4+p`AYa`vAa|+adKZ?Fb^b_?$&Dzo+~e6xYl%$&Z*WZLfMNK~ zcpuSTftvg+7P%XI=D0s0Gmoji*vIehfSe%+*vUx1biZPZcV6Q?4^ZeL?U-DI8>;mQ zCNL+ByjBcNT+O~s;MLq&>q`e1p;;xMOW+?78JGaJ0z(7@mb(pbZG`|s9bUD9DNSmD zc>IzW{G9?HP-3IN@5m%aWNDGLLPw-U58qXzni6N#1>CJ3(_GX7R$M@65o9aS^R@F= z0w3UI55#<%fOm+TG_4!!nG5T)YINnWQ_6fI+P0fmkwh!ZB?9=5=ClYdsPF$0a6Xo* znr{QRn)`@+-PXGO?3f5z;9Y#!DQjQBSPQ#aahMebZ33Q%IgJR0US?=Na7ZS`DQy>{ zPiOT4A~j9xStPJ~^5JXy{}Y6sXP;e&t$V2!VEfL9G^?GNfEKPHg|;pYjrD_+Q`*1N zdKL*hKc`}^>}+Zy0+ytt|KNAj7uDSRDZn2otj*HS=@&)P2+-|rEl&?AquRs$A(?!i z;{2nfaof)ecXA}l0@S~6aD9xt+=ma3a9=} Date: Fri, 17 May 2019 17:36:56 +0100 Subject: [PATCH 23/96] Two implementations to fix spatial mapping ignoring the transform on the Playspace node. --- .../WindowsMixedRealitySpatialMeshObserver.cs | 69 +++++++++++- .../SpatialAwarenessMeshObject.cs | 101 ++++++++++++++++++ 2 files changed, 165 insertions(+), 5 deletions(-) diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs index 7c35252f6c1..70728b1dd8a 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.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. +#define MAFINC_ANCHOR_CHILD + using Microsoft.MixedReality.Toolkit.SpatialAwareness; using Microsoft.MixedReality.Toolkit.Utilities; using System.Collections.Generic; @@ -407,6 +409,40 @@ private void UpdateObserver() } } +#if MAFINC_ANCHOR_CHILD + private class PlayspaceAdapter : MonoBehaviour + { + /// + /// Compute concatenation of lhs * rhs such that lhs * (rhs * v) = Concat(lhs, rhs) * v + /// + /// + /// Start defining pose * vector = pose.p + pose.r * vector + /// lhs * (rhs * v) + /// = lhs * (rhs.p + rhs.r * v) + /// = lhs.p + lhs.r * (rhs.p + rhs.r * v) + /// = lhs.p + lhs.r * rhs.p + lhs.r * rhs.r * v + /// = Pose(lhs.p + lhs.r * rhs.p, lhs.r * rhs.r) * v + /// + /// Second transform to apply + /// First transform to apply + /// + private static Pose Concatenate(Pose lhs, Pose rhs) + { + return new Pose(lhs.position + lhs.rotation * rhs.position, lhs.rotation * rhs.rotation); + } + + private void Update() + { + Pose worldFromPlayspace = new Pose(MixedRealityPlayspace.Position, MixedRealityPlayspace.Rotation); + Pose anchorPose = new Pose(transform.position, transform.rotation); + Pose parentPose = Concatenate(worldFromPlayspace, anchorPose); + transform.parent.position = parentPose.position; + transform.parent.rotation = parentPose.rotation; + } + + } +#endif // MAFINC_ANCHOR_CHILD + /// /// Issue a request to the Surface Observer to begin baking the mesh. /// @@ -422,7 +458,21 @@ private void RequestMesh(SurfaceId surfaceId) { newMesh = SpatialAwarenessMeshObject.Create(null, MeshPhysicsLayer, meshName, surfaceId.handle); +#if !MAFINC_ANCHOR_CHILD worldAnchor = newMesh.GameObject.AddComponent(); +#else // MAFINC_ANCHOR_CHILD + // mafinc + // add a child to newMesh.GameObject.transform + // add WorldAnchor to child + // add adapter component to child + // * adapter sets parent (newMesh.GameObject) transform to playspace.transform * transform (because this.transform is world anchor) + + GameObject anchorHolder = new GameObject(meshName + "_anchor"); + anchorHolder.AddComponent(); // replace with required component? + worldAnchor = anchorHolder.AddComponent(); // replace with required component and GetComponent()? + anchorHolder.transform.SetParent(newMesh.GameObject.transform, false); + +#endif // MAFINC_ANCHOR_CHILD } else { @@ -433,7 +483,16 @@ private void RequestMesh(SurfaceId surfaceId) newMesh.Id = surfaceId.handle; newMesh.GameObject.SetActive(true); +#if !MAFINC_ANCHOR_CHILD worldAnchor = newMesh.GameObject.GetComponent(); +#else // MAFINC_ANCHOR_CHILD + // mafinc + // assert there is exactly one child of newMesh.GameObject + // get worldAnchor component from newMesh.GameObject.transform.GetChild(0).gameObject + Debug.Assert(newMesh.GameObject.transform.childCount == 1, "Expecting a single child holding the WorldAnchor"); + worldAnchor = newMesh.GameObject.transform.GetChild(0).gameObject.GetComponent(); + +#endif // MAFINC_ANCHOR_CHILD } Debug.Assert(worldAnchor != null); @@ -631,11 +690,11 @@ private void SurfaceObserver_OnDataReady(SurfaceData cookedData, bool outputWrit } #endif // UNITY_WSA - /// - /// Applies the mesh display option to existing meshes when modified at runtime. - /// - /// The to apply to the meshes. - private void ApplyUpdatedMeshDisplayOption(SpatialAwarenessMeshDisplayOptions option) + /// + /// Applies the mesh display option to existing meshes when modified at runtime. + /// + /// The to apply to the meshes. + private void ApplyUpdatedMeshDisplayOption(SpatialAwarenessMeshDisplayOptions option) { bool enable = (option != SpatialAwarenessMeshDisplayOptions.None); diff --git a/Assets/MixedRealityToolkit/Definitions/SpatialAwareness/SpatialAwarenessMeshObject.cs b/Assets/MixedRealityToolkit/Definitions/SpatialAwareness/SpatialAwarenessMeshObject.cs index c50b2037e60..e7b7e48de97 100644 --- a/Assets/MixedRealityToolkit/Definitions/SpatialAwareness/SpatialAwarenessMeshObject.cs +++ b/Assets/MixedRealityToolkit/Definitions/SpatialAwareness/SpatialAwarenessMeshObject.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. +//#define MAFINC_IN_OBJECT + using System; using UnityEngine; @@ -17,9 +19,16 @@ public class SpatialAwarenessMeshObject : BaseSpatialAwarenessObject /// private static Type[] requiredMeshComponents = { +#if !MAFINC_IN_OBJECT typeof(MeshFilter), typeof(MeshRenderer), typeof(MeshCollider) +#else // MAFINC_IN_OBJECT + typeof(MeshFilter), + typeof(MeshRenderer), + typeof(MeshCollider), + typeof(PlayspaceAdapter) +#endif // MAFINC_IN_OBJECT }; /// @@ -32,6 +41,75 @@ public class SpatialAwarenessMeshObject : BaseSpatialAwarenessObject /// private SpatialAwarenessMeshObject() : base() { } +#if MAFINC_IN_OBJECT // mafinc + private class PlayspaceAdapter : MonoBehaviour + { + /// + /// Compute concatenation of lhs * rhs such that lhs * (rhs * v) = Concat(lhs, rhs) * v + /// + /// + /// Start defining pose * vector = pose.p + pose.r * vector + /// lhs * (rhs * v) + /// = lhs * (rhs.p + rhs.r * v) + /// = lhs.p + lhs.r * (rhs.p + rhs.r * v) + /// = lhs.p + lhs.r * rhs.p + lhs.r * rhs.r * v + /// = Pose(lhs.p + lhs.r * rhs.p, lhs.r * rhs.r) * v + /// + /// Second transform to apply + /// First transform to apply + /// + private static Pose Concatenate(Pose lhs, Pose rhs) + { + return new Pose(lhs.position + lhs.rotation * rhs.position, lhs.rotation * rhs.rotation); + } + + /// + /// Compute the pose that concatenated with the input produces an identity pose (pos=0, rot=none). + /// + /// + /// Concatenate(inv, pose) = Pose.identity === (Vector3.zero, Quatenion.identity) + /// (inv.p + inv.r * pose.p, inv.r * pose.r) = (Vector3.zero, Quatenion.identity) // see def of Concatena5te above. + /// Therefore: + /// inv.r * pose.r = Quaternion.identity + /// inv.r * pose.r * pose.r.inverse() = Quaternion.identity * pose.r.inverse() + /// inv.r = pose.r.inverse() + /// And + /// inv.p + inv.r * pose.p = Vector3.zero + /// inv.p = -(inv.r * pose.p) + /// inv.p = -(pose.r.inverse() * pose.p) // using inv.r == pose.r.inverse() from above. + /// So then: + /// inv = (-(pose.r.inverse() * pose.p), pose.r.inverse()) + /// + /// The pose to return the inverse of. + /// The inverse of pose + private static Pose Invert(Pose pose) + { + var inverseRotation = Quaternion.Inverse(pose.rotation); + return new Pose(-(inverseRotation * pose.position), inverseRotation); + } + + private Pose ComputeAdaptedPose() + { + Pose worldFromPlayspace = new Pose(MixedRealityPlayspace.Position, MixedRealityPlayspace.Rotation); + Transform parentTransform = transform.parent.transform; + Pose playspaceFromParent = new Pose(parentTransform.position, parentTransform.rotation); + Pose parentFromPlayspace = Invert(playspaceFromParent); + + return Concatenate(parentFromPlayspace, Concatenate(worldFromPlayspace, playspaceFromParent)); + //return Concatenate(parentFromPlayspace, playspaceFromParent); + //return new Pose(Vector3.zero, Quaternion.identity); + } + + private void Update() + { + Pose adaptedPose = ComputeAdaptedPose(); + transform.localPosition = adaptedPose.position; + transform.localRotation = adaptedPose.rotation; + } + } + +#endif // marfinc + /// /// Creates a . /// @@ -46,6 +124,7 @@ public static SpatialAwarenessMeshObject Create(Mesh mesh, int layer, string nam { SpatialAwarenessMeshObject newMesh = new SpatialAwarenessMeshObject(); +#if !MAFINC_IN_OBJECT // mafinc newMesh.Id = meshId; newMesh.GameObject = new GameObject(name, requiredMeshComponents); newMesh.GameObject.layer = layer; @@ -62,6 +141,28 @@ public static SpatialAwarenessMeshObject Create(Mesh mesh, int layer, string nam newMesh.Collider = newMesh.GameObject.GetComponent(); newMesh.Collider.sharedMesh = null; newMesh.Collider.sharedMesh = newMesh.Filter.sharedMesh; +#else // mafinc + newMesh.Id = meshId; + newMesh.GameObject = new GameObject(name); + newMesh.GameObject.layer = layer; + + var adapter = new GameObject(name + "transformed", requiredMeshComponents); + //adapter.AddComponent(); // mafinc - add to required? + adapter.transform.SetParent(newMesh.GameObject.transform, false); + + newMesh.Filter = adapter.GetComponent(); + newMesh.Filter.sharedMesh = mesh; + + newMesh.Renderer = adapter.GetComponent(); + + // Reset the surface mesh collider to fit the updated mesh. + // Unity tribal knowledge indicates that to change the mesh assigned to a + // mesh collider, the mesh must first be set to null. Presumably there + // is a side effect in the setter when setting the shared mesh to null. + newMesh.Collider = adapter.GetComponent(); + newMesh.Collider.sharedMesh = null; + newMesh.Collider.sharedMesh = newMesh.Filter.sharedMesh; +#endif // mafinc return newMesh; } From e2d95e7727a2df67c569f8ba7a156a2a1f6cc1fa Mon Sep 17 00:00:00 2001 From: Mark Finch Date: Fri, 17 May 2019 17:48:23 +0100 Subject: [PATCH 24/96] Cleanup and comments. --- .../WindowsMixedRealitySpatialMeshObserver.cs | 39 +++++++------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs index 70728b1dd8a..70624d692c3 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.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. -#define MAFINC_ANCHOR_CHILD - using Microsoft.MixedReality.Toolkit.SpatialAwareness; using Microsoft.MixedReality.Toolkit.Utilities; using System.Collections.Generic; @@ -409,7 +407,10 @@ private void UpdateObserver() } } -#if MAFINC_ANCHOR_CHILD + /// + /// Internal component to monitor the WorldAnchor's transform, apply the MixedRealityPlayspace transform, + /// and apply it to its parent. + /// private class PlayspaceAdapter : MonoBehaviour { /// @@ -431,6 +432,9 @@ private static Pose Concatenate(Pose lhs, Pose rhs) return new Pose(lhs.position + lhs.rotation * rhs.position, lhs.rotation * rhs.rotation); } + /// + /// Compute and set the parent's transform. + /// private void Update() { Pose worldFromPlayspace = new Pose(MixedRealityPlayspace.Position, MixedRealityPlayspace.Rotation); @@ -439,9 +443,7 @@ private void Update() transform.parent.position = parentPose.position; transform.parent.rotation = parentPose.rotation; } - } -#endif // MAFINC_ANCHOR_CHILD /// /// Issue a request to the Surface Observer to begin baking the mesh. @@ -458,21 +460,16 @@ private void RequestMesh(SurfaceId surfaceId) { newMesh = SpatialAwarenessMeshObject.Create(null, MeshPhysicsLayer, meshName, surfaceId.handle); -#if !MAFINC_ANCHOR_CHILD - worldAnchor = newMesh.GameObject.AddComponent(); -#else // MAFINC_ANCHOR_CHILD - // mafinc - // add a child to newMesh.GameObject.transform - // add WorldAnchor to child - // add adapter component to child - // * adapter sets parent (newMesh.GameObject) transform to playspace.transform * transform (because this.transform is world anchor) - + // The WorldAnchor component places its object exactly where the anchor is in the same space as the camera. + // But the meshes should show up transformed by the MixedRealityPlayspace transform, the same one that modifies the camera. + // So rather than put the WorldAnchor on the meshes GameObject, the WorldAnchor is placed out of the way in the scene, + // and its transform is concatenated with the Playspace transform to give the mesh's transform. + // That adapting the WorldAnchor's transform into playspace is done by the intermal PlayspaceAdapter component. + // GameObject anchorHolder = new GameObject(meshName + "_anchor"); anchorHolder.AddComponent(); // replace with required component? worldAnchor = anchorHolder.AddComponent(); // replace with required component and GetComponent()? anchorHolder.transform.SetParent(newMesh.GameObject.transform, false); - -#endif // MAFINC_ANCHOR_CHILD } else { @@ -483,16 +480,10 @@ private void RequestMesh(SurfaceId surfaceId) newMesh.Id = surfaceId.handle; newMesh.GameObject.SetActive(true); -#if !MAFINC_ANCHOR_CHILD - worldAnchor = newMesh.GameObject.GetComponent(); -#else // MAFINC_ANCHOR_CHILD - // mafinc - // assert there is exactly one child of newMesh.GameObject - // get worldAnchor component from newMesh.GameObject.transform.GetChild(0).gameObject + // There should be exactly one child on the newMesh.GameObject, and that is the GameObject added above + // to hold the WorldAnchor component and adapter. Debug.Assert(newMesh.GameObject.transform.childCount == 1, "Expecting a single child holding the WorldAnchor"); worldAnchor = newMesh.GameObject.transform.GetChild(0).gameObject.GetComponent(); - -#endif // MAFINC_ANCHOR_CHILD } Debug.Assert(worldAnchor != null); From b3ffb8cb3ec4de4204e9880fdbe2e36a3b97a058 Mon Sep 17 00:00:00 2001 From: Mark Finch Date: Fri, 17 May 2019 17:50:52 +0100 Subject: [PATCH 25/96] Undo other version. --- .../SpatialAwarenessMeshObject.cs | 101 ------------------ 1 file changed, 101 deletions(-) diff --git a/Assets/MixedRealityToolkit/Definitions/SpatialAwareness/SpatialAwarenessMeshObject.cs b/Assets/MixedRealityToolkit/Definitions/SpatialAwareness/SpatialAwarenessMeshObject.cs index e7b7e48de97..c50b2037e60 100644 --- a/Assets/MixedRealityToolkit/Definitions/SpatialAwareness/SpatialAwarenessMeshObject.cs +++ b/Assets/MixedRealityToolkit/Definitions/SpatialAwareness/SpatialAwarenessMeshObject.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. -//#define MAFINC_IN_OBJECT - using System; using UnityEngine; @@ -19,16 +17,9 @@ public class SpatialAwarenessMeshObject : BaseSpatialAwarenessObject /// private static Type[] requiredMeshComponents = { -#if !MAFINC_IN_OBJECT typeof(MeshFilter), typeof(MeshRenderer), typeof(MeshCollider) -#else // MAFINC_IN_OBJECT - typeof(MeshFilter), - typeof(MeshRenderer), - typeof(MeshCollider), - typeof(PlayspaceAdapter) -#endif // MAFINC_IN_OBJECT }; /// @@ -41,75 +32,6 @@ public class SpatialAwarenessMeshObject : BaseSpatialAwarenessObject /// private SpatialAwarenessMeshObject() : base() { } -#if MAFINC_IN_OBJECT // mafinc - private class PlayspaceAdapter : MonoBehaviour - { - /// - /// Compute concatenation of lhs * rhs such that lhs * (rhs * v) = Concat(lhs, rhs) * v - /// - /// - /// Start defining pose * vector = pose.p + pose.r * vector - /// lhs * (rhs * v) - /// = lhs * (rhs.p + rhs.r * v) - /// = lhs.p + lhs.r * (rhs.p + rhs.r * v) - /// = lhs.p + lhs.r * rhs.p + lhs.r * rhs.r * v - /// = Pose(lhs.p + lhs.r * rhs.p, lhs.r * rhs.r) * v - /// - /// Second transform to apply - /// First transform to apply - /// - private static Pose Concatenate(Pose lhs, Pose rhs) - { - return new Pose(lhs.position + lhs.rotation * rhs.position, lhs.rotation * rhs.rotation); - } - - /// - /// Compute the pose that concatenated with the input produces an identity pose (pos=0, rot=none). - /// - /// - /// Concatenate(inv, pose) = Pose.identity === (Vector3.zero, Quatenion.identity) - /// (inv.p + inv.r * pose.p, inv.r * pose.r) = (Vector3.zero, Quatenion.identity) // see def of Concatena5te above. - /// Therefore: - /// inv.r * pose.r = Quaternion.identity - /// inv.r * pose.r * pose.r.inverse() = Quaternion.identity * pose.r.inverse() - /// inv.r = pose.r.inverse() - /// And - /// inv.p + inv.r * pose.p = Vector3.zero - /// inv.p = -(inv.r * pose.p) - /// inv.p = -(pose.r.inverse() * pose.p) // using inv.r == pose.r.inverse() from above. - /// So then: - /// inv = (-(pose.r.inverse() * pose.p), pose.r.inverse()) - /// - /// The pose to return the inverse of. - /// The inverse of pose - private static Pose Invert(Pose pose) - { - var inverseRotation = Quaternion.Inverse(pose.rotation); - return new Pose(-(inverseRotation * pose.position), inverseRotation); - } - - private Pose ComputeAdaptedPose() - { - Pose worldFromPlayspace = new Pose(MixedRealityPlayspace.Position, MixedRealityPlayspace.Rotation); - Transform parentTransform = transform.parent.transform; - Pose playspaceFromParent = new Pose(parentTransform.position, parentTransform.rotation); - Pose parentFromPlayspace = Invert(playspaceFromParent); - - return Concatenate(parentFromPlayspace, Concatenate(worldFromPlayspace, playspaceFromParent)); - //return Concatenate(parentFromPlayspace, playspaceFromParent); - //return new Pose(Vector3.zero, Quaternion.identity); - } - - private void Update() - { - Pose adaptedPose = ComputeAdaptedPose(); - transform.localPosition = adaptedPose.position; - transform.localRotation = adaptedPose.rotation; - } - } - -#endif // marfinc - /// /// Creates a . /// @@ -124,7 +46,6 @@ public static SpatialAwarenessMeshObject Create(Mesh mesh, int layer, string nam { SpatialAwarenessMeshObject newMesh = new SpatialAwarenessMeshObject(); -#if !MAFINC_IN_OBJECT // mafinc newMesh.Id = meshId; newMesh.GameObject = new GameObject(name, requiredMeshComponents); newMesh.GameObject.layer = layer; @@ -141,28 +62,6 @@ public static SpatialAwarenessMeshObject Create(Mesh mesh, int layer, string nam newMesh.Collider = newMesh.GameObject.GetComponent(); newMesh.Collider.sharedMesh = null; newMesh.Collider.sharedMesh = newMesh.Filter.sharedMesh; -#else // mafinc - newMesh.Id = meshId; - newMesh.GameObject = new GameObject(name); - newMesh.GameObject.layer = layer; - - var adapter = new GameObject(name + "transformed", requiredMeshComponents); - //adapter.AddComponent(); // mafinc - add to required? - adapter.transform.SetParent(newMesh.GameObject.transform, false); - - newMesh.Filter = adapter.GetComponent(); - newMesh.Filter.sharedMesh = mesh; - - newMesh.Renderer = adapter.GetComponent(); - - // Reset the surface mesh collider to fit the updated mesh. - // Unity tribal knowledge indicates that to change the mesh assigned to a - // mesh collider, the mesh must first be set to null. Presumably there - // is a side effect in the setter when setting the shared mesh to null. - newMesh.Collider = adapter.GetComponent(); - newMesh.Collider.sharedMesh = null; - newMesh.Collider.sharedMesh = newMesh.Filter.sharedMesh; -#endif // mafinc return newMesh; } From 7a484eb2b06d57273e7fb16c290b635789e0f5c0 Mon Sep 17 00:00:00 2001 From: Mark Finch Date: Fri, 17 May 2019 17:57:24 +0100 Subject: [PATCH 26/96] Cleanup comments. --- .../WindowsMixedRealitySpatialMeshObserver.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs index 70624d692c3..baed0683799 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs @@ -460,12 +460,14 @@ private void RequestMesh(SurfaceId surfaceId) { newMesh = SpatialAwarenessMeshObject.Create(null, MeshPhysicsLayer, meshName, surfaceId.handle); - // The WorldAnchor component places its object exactly where the anchor is in the same space as the camera. - // But the meshes should show up transformed by the MixedRealityPlayspace transform, the same one that modifies the camera. - // So rather than put the WorldAnchor on the meshes GameObject, the WorldAnchor is placed out of the way in the scene, - // and its transform is concatenated with the Playspace transform to give the mesh's transform. - // That adapting the WorldAnchor's transform into playspace is done by the intermal PlayspaceAdapter component. - // + // The WorldAnchor component places its object where the anchor is in the same space as the camera. + // But since the camera is repositioned by the MixedRealityPlayspace's transform, the meshes' transforms + // should also the WorldAnchor position repositioned by the MixedRealityPlayspace's transform. + // So rather than put the WorldAnchor on the mesh's GameObject, the WorldAnchor is placed out of the way in the scene, + // and its transform is concatenated with the Playspace transform to compute the transform on the mesh's object. + // That adapting the WorldAnchor's transform into playspace is done by the internal PlayspaceAdapter component. + // The GameObject the WorldAnchor is placed on is unimportant, but it is convenient for cleanup to make it a child + // of the GameObject whose transform will track it. GameObject anchorHolder = new GameObject(meshName + "_anchor"); anchorHolder.AddComponent(); // replace with required component? worldAnchor = anchorHolder.AddComponent(); // replace with required component and GetComponent()? From ecd764635e7eb3c32d45822dab3330eb45319f18 Mon Sep 17 00:00:00 2001 From: Will Wei Date: Fri, 17 May 2019 11:08:48 -0700 Subject: [PATCH 27/96] Turning off "Enable Hand Joint Visualization" turns off hand input in Editor https://github.com/microsoft/MixedRealityToolkit-Unity/issues/4268 It turns out that the hand pan interaction script was directly calling into the hand visualization code in order to get joint locations, instead of just calling the hand APIs themselves (which have the exact same data). As I understand, historically the only way of getting this information was through the visualization class. It's been a while that this hasn't been the case, so now it's good to just go straight to the joint data. --- .../UX/Scripts/Slate/HandInteractionPanZoom.cs | 18 ++++-------------- .../Devices/IMixedRealityHandVisualizer.cs | 2 ++ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/HandInteractionPanZoom.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/HandInteractionPanZoom.cs index d625e619b1e..4cbea6213c1 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/HandInteractionPanZoom.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/HandInteractionPanZoom.cs @@ -643,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; 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 From ea1737fe4131ea63e4f2f732e32b5d2fd95d8e07 Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Fri, 17 May 2019 12:35:20 -0700 Subject: [PATCH 28/96] Update TestUtilities.cs --- Assets/MixedRealityToolkit.Tests/TestUtilities.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs index d0d14a9c20a..50c3ce2425f 100644 --- a/Assets/MixedRealityToolkit.Tests/TestUtilities.cs +++ b/Assets/MixedRealityToolkit.Tests/TestUtilities.cs @@ -32,7 +32,7 @@ public static void InitializeMixedRealityToolkit() } /// - /// Destroyes all scene assets that were created over the course of testing + /// Destroys all scene assets that were created over the course of testing /// public static void TearDownScenes() { From 5c1cf780172a63221206e1a088ae622a2adcd3da Mon Sep 17 00:00:00 2001 From: Yoon Park Date: Fri, 17 May 2019 14:46:53 -0700 Subject: [PATCH 29/96] Unchecked 'Import Materials' for the models. --- .../Features/UX/Meshes/Cursors/Cursor_Focus_geo.fbx.meta | 2 +- .../Features/UX/Meshes/Cursors/Cursor_IBeam.fbx.meta | 2 +- .../Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx.meta | 2 +- .../Features/UX/Meshes/Cursors/Cursor_MoveArrows_geo.fbx.meta | 2 +- .../Features/UX/Meshes/Cursors/Cursor_Press_geo.fbx.meta | 2 +- .../Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx.meta | 2 +- .../Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx.meta | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Focus_geo.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Focus_geo.fbx.meta index 0a8eea915ed..bd16e63dde9 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Focus_geo.fbx.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Focus_geo.fbx.meta @@ -22,7 +22,7 @@ ModelImporter: name: Shadow second: {fileID: 2100000, guid: fc1b6cd8da653e3448dcdb722ada2ebc, type: 2} materials: - importMaterials: 1 + importMaterials: 0 materialName: 0 materialSearch: 1 materialLocation: 1 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_IBeam.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_IBeam.fbx.meta index 7c46e37300c..280f064575b 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_IBeam.fbx.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_IBeam.fbx.meta @@ -16,7 +16,7 @@ ModelImporter: name: ibeam_dx second: {fileID: 2100000, guid: fc1b6cd8da653e3448dcdb722ada2ebc, type: 2} materials: - importMaterials: 1 + importMaterials: 0 materialName: 0 materialSearch: 1 materialLocation: 1 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx.meta index 0d2cd949832..1868cb14a71 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MousePointer_geo.fbx.meta @@ -16,7 +16,7 @@ ModelImporter: name: pasted__dx11Shader80 second: {fileID: 2100000, guid: 2137afd1049cf61428db6f7025881422, type: 2} materials: - importMaterials: 1 + importMaterials: 0 materialName: 0 materialSearch: 1 materialLocation: 1 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MoveArrows_geo.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MoveArrows_geo.fbx.meta index 586bb432e9a..842a4754b3f 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MoveArrows_geo.fbx.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_MoveArrows_geo.fbx.meta @@ -22,7 +22,7 @@ ModelImporter: name: SHADOW_PBR second: {fileID: 2100000, guid: fc1b6cd8da653e3448dcdb722ada2ebc, type: 2} materials: - importMaterials: 1 + importMaterials: 0 materialName: 0 materialSearch: 1 materialLocation: 1 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Press_geo.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Press_geo.fbx.meta index 7efdf3099ae..1e81a5c63a5 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Press_geo.fbx.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Press_geo.fbx.meta @@ -22,7 +22,7 @@ ModelImporter: name: Shadow second: {fileID: 2100000, guid: fc1b6cd8da653e3448dcdb722ada2ebc, type: 2} materials: - importMaterials: 1 + importMaterials: 0 materialName: 0 materialSearch: 1 materialLocation: 1 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx.meta index de82f1e5e3d..bc57b0e67b3 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_Rest_geo.fbx.meta @@ -22,7 +22,7 @@ ModelImporter: name: Shadow second: {fileID: 2100000, guid: fc1b6cd8da653e3448dcdb722ada2ebc, type: 2} materials: - importMaterials: 1 + importMaterials: 0 materialName: 0 materialSearch: 1 materialLocation: 1 diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx.meta b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx.meta index 6310c6772b1..656c015ca1e 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx.meta +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Meshes/Cursors/Cursor_RotateArrows_geo.fbx.meta @@ -22,7 +22,7 @@ ModelImporter: name: Shadow second: {fileID: 2100000, guid: fc1b6cd8da653e3448dcdb722ada2ebc, type: 2} materials: - importMaterials: 1 + importMaterials: 0 materialName: 0 materialSearch: 1 materialLocation: 1 From 97698307d7aa009b506f40c39ef95218dcdc5d9f Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Sun, 19 May 2019 08:18:36 -0700 Subject: [PATCH 30/96] Bounding box test print min and max scale --- .../Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index c85625592f0..364f9e7999c 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -5,6 +5,7 @@ using Microsoft.MixedReality.Toolkit.UI; using System.Collections; using System.Collections.Generic; +using System.Text; using UnityEditor; using UnityEngine; @@ -15,6 +16,7 @@ public class BoundingBoxTest : InputSystemGlobalListener, IMixedRealitySpeechHan private bool speechTriggeredFalg; private Vector3 cubePosition = new Vector3(0, 0, 2); + private BoundingBox bbox; // Start is called before the first frame update protected override void Start() @@ -26,7 +28,14 @@ protected override void Start() private void SetStatus(string status) { Debug.Assert(statusText != null, "statusText on BoundingBoxTest should not be null"); - statusText.text = $"Test {status}\nPress '1' or say 'select' to continue"; + StringBuilder b = new StringBuilder(); + b.AppendLine($"Test {status}"); + if (bbox != null) + { + b.AppendLine($"minscale: {bbox.ScaleMinimum} maxscale: {bbox.ScaleMaximum}"); + } + b.AppendLine($"Press '1' or say 'select' to continue"); + statusText.text = b.ToString(); } private IEnumerator Sequence() @@ -37,7 +46,7 @@ private IEnumerator Sequence() cube.transform.position = cubePosition; SetStatus("Instantiate BoundingBox"); - BoundingBox bbox = cube.AddComponent(); + bbox = cube.AddComponent(); bbox.HideElementsInInspector = false; bbox.BoundingBoxActivation = BoundingBox.BoundingBoxActivationType.ActivateOnStart; var mh = cube.AddComponent(); From 29cd92dda3133a374232fce3a37cedb2182060fa Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Sun, 19 May 2019 08:27:20 -0700 Subject: [PATCH 31/96] Fix min and max scale - add initialScaleOnStart, distinguish is from initialScaleOnGrabStart - CaptureInitialState should run on Awake / Start, not on CreateRig. --- .../UX/Scripts/BoundingBox/BoundingBox.cs | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index eaaea058ee4..ce783566fd3 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -1,5 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. +// Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Input; using System.Collections.Generic; @@ -547,20 +546,21 @@ public bool HideElementsInInspector private Vector3 currentRotationAxis; // Scale of the target at the beginning of the current manipulation - private Vector3 initialScale; - + private Vector3 initialScaleOnGrabStart; // Position of the target at the beginning of the current manipulation - private Vector3 initialPosition; - - private Vector3 maximumScale; - private Vector3 minimumScale; - + private Vector3 initialPositionOnGrabStart; // Point that was initially grabbed in OnPointerDown() private Vector3 initialGrabPoint; - // Current position of the grab point private Vector3 currentGrabPoint; + + // Scale of the target at startup (in Start()) + private Vector3 initialScaleAtStart; + private Vector3 maximumScale; + private Vector3 minimumScale; + + // Grab point position in pointer space. Used to calculate the current grab point from the current pointer pose. private Vector3 grabPointInPointer; @@ -642,7 +642,7 @@ public void UnhighlightWires() /// /// 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. + /// If true the values will be multiplied by scale of target at startup. If false they will be in absolute local scale. public void SetScaleLimits(float min, float max, bool relativeToInitialState = true) { scaleMaximum = max; @@ -654,8 +654,8 @@ public void SetScaleLimits(float min, float max, bool relativeToInitialState = t { if (relativeToInitialState) { - maximumScale = target.transform.localScale * scaleMaximum; - minimumScale = target.transform.localScale * scaleMinimum; + maximumScale = initialScaleAtStart * scaleMaximum; + minimumScale = initialScaleAtStart * scaleMinimum; } else { @@ -671,6 +671,7 @@ public void SetScaleLimits(float min, float max, bool relativeToInitialState = t private void Start() { CreateRig(); + CaptureInitialState(); if (activation == BoundingBoxActivationType.ActivateByProximityAndPointer || activation == BoundingBoxActivationType.ActivateByProximity || @@ -708,7 +709,6 @@ private void CreateRig() DestroyRig(); SetMaterials(); InitializeDataStructures(); - CaptureInitialState(); SetBoundingBoxCollider(); UpdateBounds(); AddCorners(); @@ -796,15 +796,15 @@ private void TransformTarget() float currentDist = Vector3.Dot(currentGrabPoint - oppositeCorner, diagonalDir); float scaleFactor = 1 + (currentDist - initialDist) / initialDist; - Vector3 newScale = initialScale * scaleFactor; + Vector3 newScale = initialScaleOnGrabStart * scaleFactor; Vector3 clampedScale = ClampScale(newScale); if (clampedScale != newScale) { - scaleFactor = clampedScale[0] / initialScale[0]; + scaleFactor = clampedScale[0] / initialScaleOnGrabStart[0]; } Target.transform.localScale = clampedScale; - Target.transform.position = initialPosition * scaleFactor + (1 - scaleFactor) * oppositeCorner; + Target.transform.position = initialPositionOnGrabStart * scaleFactor + (1 - scaleFactor) * oppositeCorner; } } } @@ -1340,8 +1340,10 @@ private void CaptureInitialState() var target = Target; if (target != null) { - maximumScale = Target.transform.localScale * scaleMaximum; - minimumScale = Target.transform.localScale * scaleMinimum; + initialScaleAtStart = target.transform.localScale; + + maximumScale = initialScaleAtStart * scaleMaximum; + minimumScale = initialScaleAtStart * scaleMinimum; isChildOfTarget = transform.IsChildOf(target.transform); } } @@ -1781,8 +1783,8 @@ void IMixedRealityPointerHandler.OnPointerDown(MixedRealityPointerEventData even currentPointer = eventData.Pointer; initialGrabPoint = currentPointer.Result.Details.Point; currentGrabPoint = initialGrabPoint; - initialScale = Target.transform.localScale; - initialPosition = Target.transform.position; + initialScaleOnGrabStart = Target.transform.localScale; + initialPositionOnGrabStart = Target.transform.position; grabPointInPointer = Quaternion.Inverse(eventData.Pointer.Rotation) * (initialGrabPoint - currentPointer.Position); SetHighlighted(grabbedHandleTransform); From 27ebcdc1b3ca7613973d5114a07723b3fe4f57eb Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Sun, 19 May 2019 08:36:56 -0700 Subject: [PATCH 32/96] Test for ShowWireframe false and true --- .../Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index 364f9e7999c..51ce601ea16 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -64,6 +64,14 @@ private IEnumerator Sequence() bbox.FlattenAxis = BoundingBox.FlattenModeType.DoNotFlatten; yield return WaitForSpeechCommand(); + SetStatus("ShowWireframe false"); + bbox.ShowWireFrame = false; + yield return WaitForSpeechCommand(); + + SetStatus("ShowWireframe true"); + bbox.ShowWireFrame = true; + yield return WaitForSpeechCommand(); + SetStatus("BoxPadding 0.2f"); bbox.BoxPadding = new Vector3(0.2f, 0.2f, 0.2f); yield return WaitForSpeechCommand(); From 7465541e8d4f11a7383880c1545152fe0f414f04 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Sun, 19 May 2019 08:52:48 -0700 Subject: [PATCH 33/96] Fix showWireframe false not working --- .../Features/UX/Scripts/BoundingBox/BoundingBox.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index ce783566fd3..fa4b310a568 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -746,6 +746,7 @@ private void DestroyRig() Destroy(transform.gameObject); } balls.Clear(); + balls = null; } if (links != null) @@ -755,6 +756,7 @@ private void DestroyRig() Destroy(transform.gameObject); } links.Clear(); + links = null; } if (corners != null) @@ -764,6 +766,7 @@ private void DestroyRig() Destroy(transform.gameObject); } corners.Clear(); + corners = null; } if (rigRoot != null) From 36659162f8bb8f5575076d00a5010f1ed2b976c2 Mon Sep 17 00:00:00 2001 From: Mark Finch Date: Mon, 20 May 2019 11:36:21 +0100 Subject: [PATCH 34/96] Fix accidental indent. --- .../WindowsMixedRealitySpatialMeshObserver.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs index baed0683799..369e6de5665 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs @@ -683,11 +683,11 @@ private void SurfaceObserver_OnDataReady(SurfaceData cookedData, bool outputWrit } #endif // UNITY_WSA - /// - /// Applies the mesh display option to existing meshes when modified at runtime. - /// - /// The to apply to the meshes. - private void ApplyUpdatedMeshDisplayOption(SpatialAwarenessMeshDisplayOptions option) + /// + /// Applies the mesh display option to existing meshes when modified at runtime. + /// + /// The to apply to the meshes. + private void ApplyUpdatedMeshDisplayOption(SpatialAwarenessMeshDisplayOptions option) { bool enable = (option != SpatialAwarenessMeshDisplayOptions.None); From cf457cfb9ce1834d967da5ebc90645b3f6639365 Mon Sep 17 00:00:00 2001 From: Mark Finch Date: Mon, 20 May 2019 15:47:15 +0100 Subject: [PATCH 35/96] Replace explicit math with Unity call. --- .../WindowsMixedRealitySpatialMeshObserver.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs index 369e6de5665..6514100a7eb 100644 --- a/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs +++ b/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealitySpatialMeshObserver.cs @@ -416,20 +416,12 @@ private class PlayspaceAdapter : MonoBehaviour /// /// Compute concatenation of lhs * rhs such that lhs * (rhs * v) = Concat(lhs, rhs) * v /// - /// - /// Start defining pose * vector = pose.p + pose.r * vector - /// lhs * (rhs * v) - /// = lhs * (rhs.p + rhs.r * v) - /// = lhs.p + lhs.r * (rhs.p + rhs.r * v) - /// = lhs.p + lhs.r * rhs.p + lhs.r * rhs.r * v - /// = Pose(lhs.p + lhs.r * rhs.p, lhs.r * rhs.r) * v - /// /// Second transform to apply /// First transform to apply /// private static Pose Concatenate(Pose lhs, Pose rhs) { - return new Pose(lhs.position + lhs.rotation * rhs.position, lhs.rotation * rhs.rotation); + return rhs.GetTransformedBy(lhs); } /// From a4f70d70bfe6b2a13b84197fade7f7399742b8b9 Mon Sep 17 00:00:00 2001 From: Will Wei Date: Mon, 20 May 2019 14:45:07 -0700 Subject: [PATCH 36/96] Eye targeting is not working with near hand pointers https://github.com/microsoft/MixedRealityToolkit-Unity/issues/4431 In a previous change (https://github.com/microsoft/MixedRealityToolkit-Unity/pull/4270) a gaze provider state machine was added to bring the head gaze pointer behavior in-line with how the shell works. This had the side effect of also impacting eye-gaze state. This change brings the old eye-gaze behavior back by updating the state machine to be aware of the type of gaze being provided. Also added a bunch of tests for this new thing, along with tests that show that transitions between the two (for example, when the eye tracking system gains tracking or loses tracking) works well. --- .../InputSystem/FocusProvider.cs | 5 +- .../GazePointerVisibilityStateMachine.cs | 66 ++++++++-- .../GazePointerStateMachineTests.cs | 118 +++++++++++++++++- 3 files changed, 171 insertions(+), 18 deletions(-) diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs b/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs index eacd53195a9..ac760b4625e 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs @@ -878,7 +878,10 @@ private void ReconcilePointers() } if (gazePointer != null) { - gazePointerStateMachine.UpdateState(NumNearPointersActive, NumFarPointersActive); + gazePointerStateMachine.UpdateState( + NumNearPointersActive, + NumFarPointersActive, + InputSystem.EyeGazeProvider.IsEyeGazeValid); // The gaze cursor's visibility is controlled by IsInteractionEnabled gazePointer.IsInteractionEnabled = gazePointerStateMachine.IsGazePointerActive; diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs b/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs index 4758be9b3b6..86c60e6a869 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs @@ -4,31 +4,76 @@ 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 { - Initial, // When the application starts up, the gaze pointer should be active - GazePointerActive, // Gaze pointer is active when no hands are visible, after "select" - GazePointerInactive // Gaze pointer is inactive as soon as motion controller or articulated hand pointers appear + // 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; } } - public void UpdateState(int numNearPointersActive, int numFarPointersActive) + /// + /// 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) { - GazePointerState newState = gazePointerState; bool isMotionControllerOrHandUp = numFarPointersActive > 0 || numNearPointersActive > 0; switch (gazePointerState) { @@ -38,33 +83,32 @@ public void UpdateState(int numNearPointersActive, int numFarPointersActive) // 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 - newState = GazePointerState.GazePointerInactive; + gazePointerState = GazePointerState.GazePointerInactive; } break; case GazePointerState.GazePointerActive: if (isMotionControllerOrHandUp) { - newState = GazePointerState.GazePointerInactive; activateGazeKeywordIsSet = false; + gazePointerState = GazePointerState.GazePointerInactive; } break; case GazePointerState.GazePointerInactive: // Go from inactive to active if we say the word "select" if (activateGazeKeywordIsSet) { - newState = GazePointerState.GazePointerActive; activateGazeKeywordIsSet = false; + gazePointerState = GazePointerState.GazePointerActive; } break; default: break; } - gazePointerState = newState; } public void OnSpeechKeywordRecognized(SpeechEventData eventData) { - if (eventData.Command.Keyword.Equals("select", StringComparison.CurrentCultureIgnoreCase)) + if (!eyeGazeValid && eventData.Command.Keyword.Equals("select", StringComparison.CurrentCultureIgnoreCase)) { activateGazeKeywordIsSet = true; } diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs index 1e51eefe4c2..ad9340d26f3 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs @@ -12,7 +12,7 @@ namespace Microsoft.MixedReality.Toolkit.Tests.InputSystem class GazePointerStateMachineTests { [Test] - public void TestHandAndSpeechBehaviour() + public void TestHeadGazeHandAndSpeechBehaviour() { TestUtilities.InitializeMixedRealityToolkitScene(true); @@ -21,7 +21,7 @@ public void TestHandAndSpeechBehaviour() Assert.IsTrue(gsm.IsGazePointerActive, "Gaze pointer should be visible on start"); // After hand is raised, no pointer should show up; - gsm.UpdateState(1, 0); + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); Assert.IsFalse(gsm.IsGazePointerActive, "After hand is raised, gaze pointer should go away"); // After select called, pointer should show up again but only if no hands are up @@ -34,16 +34,122 @@ public void TestHandAndSpeechBehaviour() gsm.OnSpeechKeywordRecognized(data); Assert.IsFalse(gsm.IsGazePointerActive, "After select is called but hands are up, gaze pointer should not show up"); - gsm.UpdateState(0, 0); + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); gsm.OnSpeechKeywordRecognized(data); - gsm.UpdateState(0, 0); + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); Assert.IsTrue(gsm.IsGazePointerActive, "When no hands present and select called, gaze pointer should show up"); // Say select while gaze pointer is active, then raise hand. Gaze pointer should go away gsm.OnSpeechKeywordRecognized(data); - gsm.UpdateState(1, 0); - gsm.UpdateState(1, 0); + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); Assert.IsFalse(gsm.IsGazePointerActive, "After select called with hands present, then hand up, gaze pointer should go away"); } + + [Test] + public void TestEyeGazeHandAndSpeechBehaviour() + { + 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"); + + // Reset the state and validate that it goes back to being visible. + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, true); + Assert.IsTrue(gsm.IsGazePointerActive, "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. + 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); + 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. + 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); + 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. + 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); + 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"); + } } } From b4d1507145c5bb161ebbcf992a080b4bcc38a64d Mon Sep 17 00:00:00 2001 From: Kurtis Date: Mon, 20 May 2019 16:19:38 -0700 Subject: [PATCH 37/96] Remove unneeded configuration profile references --- Assets/MixedRealityToolkit/Services/BaseDataProvider.cs | 5 ----- Assets/MixedRealityToolkit/Services/BaseExtensionService.cs | 5 ----- 2 files changed, 10 deletions(-) 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 BaseDataProvider( /// 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 BaseExtensionService( /// The service registrar instance that registered this service. /// protected IMixedRealityServiceRegistrar Registrar { get; set; } = null; - - /// - /// Configuration Profile - /// - protected BaseMixedRealityProfile ConfigurationProfile { get; set; } = null; } } From c7a80274a3a9acbcf5b206a34d02745796a56f34 Mon Sep 17 00:00:00 2001 From: Yoon Park Date: Tue, 21 May 2019 01:07:49 -0700 Subject: [PATCH 38/96] Visual fit & finish. --- .../Features/UX/Materials/BoundingBox.mat | 26 +++++++++++-------- .../UX/Materials/BoundingBoxGrabbed.mat | 16 +++++++++--- 2 files changed, 27 insertions(+), 15 deletions(-) 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} From fb4a3500f335c2cc5c6f7720c948cc61a6703d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Tue, 21 May 2019 14:01:13 +0200 Subject: [PATCH 39/96] Make sure sim hands are initialized when starting in persistent mode. (#4495) --- .../InputSimulation/SimulatedHandDataProvider.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandDataProvider.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandDataProvider.cs index c098ce0b654..d50c4c00328 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandDataProvider.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/SimulatedHandDataProvider.cs @@ -291,7 +291,8 @@ private void SimulateHandInput( 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; @@ -319,7 +320,7 @@ private void SimulateHandInput( // 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; From 2270bec14960e2be64a1c76593b9edb2242a8ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Tue, 21 May 2019 15:59:39 +0200 Subject: [PATCH 40/96] Extend the Files utility to support non-core modules and loading. (#4476) * Extend the Files utility to support non-core modules and loading. * Remove empty hash sets after removing folders. --- .../Utilities/ArticulatedHandPose.cs | 19 +-- .../Setup/MixedRealityEditorSettings.cs | 4 +- .../Editor/Setup/MixedRealityToolkitFiles.cs | 157 ++++++++++++++---- 3 files changed, 136 insertions(+), 44 deletions(-) diff --git a/Assets/MixedRealityToolkit/Definitions/Utilities/ArticulatedHandPose.cs b/Assets/MixedRealityToolkit/Definitions/Utilities/ArticulatedHandPose.cs index 3c4f2bedd90..492766c3568 100644 --- a/Assets/MixedRealityToolkit/Definitions/Utilities/ArticulatedHandPose.cs +++ b/Assets/MixedRealityToolkit/Definitions/Utilities/ArticulatedHandPose.cs @@ -199,20 +199,19 @@ public static ArticulatedHandPose GetGesturePose(GestureId gesture) /// public static void LoadGesturePoses() { - string basePath = "Assets/MixedRealityToolkit.Services/InputSimulation/ArticulatedHandPoses/"; - LoadGesturePose(GestureId.Flat, basePath + "ArticulatedHandPose_Flat.json"); - LoadGesturePose(GestureId.Open, basePath + "ArticulatedHandPose_Open.json"); - LoadGesturePose(GestureId.Pinch, basePath + "ArticulatedHandPose_Pinch.json"); - LoadGesturePose(GestureId.PinchSteadyWrist, basePath + "ArticulatedHandPose_PinchSteadyWrist.json"); - LoadGesturePose(GestureId.Poke, basePath + "ArticulatedHandPose_Poke.json"); - LoadGesturePose(GestureId.Grab, basePath + "ArticulatedHandPose_Grab.json"); - LoadGesturePose(GestureId.ThumbsUp, basePath + "ArticulatedHandPose_ThumbsUp.json"); - LoadGesturePose(GestureId.Victory, basePath + "ArticulatedHandPose_Victory.json"); + 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 (filePath.Length > 0) + if (!string.IsNullOrEmpty(filePath)) { var pose = new ArticulatedHandPose(); pose.FromJson(File.ReadAllText(filePath)); diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityEditorSettings.cs b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityEditorSettings.cs index 36f755248d3..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!"); 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; } } } From 67842488c450cb44cb68275625953273a999dd8a Mon Sep 17 00:00:00 2001 From: Will Wei Date: Fri, 17 May 2019 15:40:48 -0700 Subject: [PATCH 41/96] Experimental commit to see how to enable .NET CI --- ...ityToolkit.Services.InputSimulation.asmdef | 3 +- ...dRealityToolkit.Tests.PlayModeTests.asmdef | 18 +++---- .../BuildAndDeploy/UnityPlayerBuildTools.cs | 11 +++++ .../BuildAndDeploy/UwpAppxBuildTools.cs | 48 ++++++++++++------- 4 files changed, 54 insertions(+), 26 deletions(-) diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityToolkit.Services.InputSimulation.asmdef b/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityToolkit.Services.InputSimulation.asmdef index 25b1d2c3c23..5480060fab8 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityToolkit.Services.InputSimulation.asmdef +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/MixedRealityToolkit.Services.InputSimulation.asmdef @@ -5,7 +5,8 @@ ], "optionalUnityReferences": [], "includePlatforms": [ - "Editor" + "Editor", + "WSA" ], "excludePlatforms": [], "allowUnsafeCode": false, diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/MixedRealityToolkit.Tests.PlayModeTests.asmdef b/Assets/MixedRealityToolkit.Tests/PlayModeTests/MixedRealityToolkit.Tests.PlayModeTests.asmdef index f4a9a467a17..2ead1c3295c 100644 --- a/Assets/MixedRealityToolkit.Tests/PlayModeTests/MixedRealityToolkit.Tests.PlayModeTests.asmdef +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/MixedRealityToolkit.Tests.PlayModeTests.asmdef @@ -1,14 +1,14 @@ { "name": "Microsoft.MixedReality.Toolkit.Tests.PlayModeTests", - "references": [ - "Microsoft.MixedReality.Toolkit", - "Microsoft.MixedReality.Toolkit.Core.Build", - "Microsoft.MixedReality.Toolkit.SDK", - "Microsoft.MixedReality.Toolkit.Services.InputSystem", - "Microsoft.MixedReality.Toolkit.Services.InputSimulation", - "Microsoft.MixedReality.Toolkit.Services.InputSimulation.Editor", - "Microsoft.MixedReality.Toolkit.Tests" - ], + "references": [ + "Microsoft.MixedReality.Toolkit", + "Microsoft.MixedReality.Toolkit.Core.Build", + "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": [ "TestAssemblies" ], diff --git a/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs b/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs index 9ef7376eb18..9cd11972f15 100644 --- a/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs +++ b/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs @@ -84,9 +84,20 @@ public static BuildReport BuildUnityPlayer(IBuildInfo buildInfo) PlayerSettings.colorSpace = buildInfo.ColorSpace.Value; } + buildInfo.ScriptingBackend = ScriptingImplementation.WinRTDotNET; + 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() From 750ad5ab0c7a22149914d7901303ff72e8a310b3 Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Tue, 21 May 2019 11:12:24 -0700 Subject: [PATCH 42/96] Move MRTK addition to utility class --- .../MixedRealityToolkitInspector.cs | 10 +- ...ityToolkitConfigurationProfileInspector.cs | 263 +++++++++++------- .../Utilities/MixedRealityInspectorUtility.cs | 13 +- 3 files changed, 175 insertions(+), 111 deletions(-) diff --git a/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.cs b/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.cs index 92ad7624027..05d31117f6e 100644 --- a/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.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.Utilities.Editor; using UnityEditor; using UnityEngine; @@ -120,14 +121,7 @@ public override void OnInspectorGUI() [MenuItem("Mixed Reality Toolkit/Add to Scene and Configure...")] public static void CreateMixedRealityToolkitGameObject() { - if (MixedRealityToolkit.IsInitialized) - { - EditorGUIUtility.PingObject(MixedRealityToolkit.Instance); - return; - } - - Selection.activeObject = new GameObject("MixedRealityToolkit").AddComponent(); - Debug.Assert(MixedRealityToolkit.IsInitialized); + MixedRealityInspectorUtility.AddMixedRealityToolkitToScene(); EditorGUIUtility.PingObject(MixedRealityToolkit.Instance); } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs index 15178e5163f..bb35493ef97 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs @@ -5,7 +5,7 @@ using Microsoft.MixedReality.Toolkit.Input; using Microsoft.MixedReality.Toolkit.SpatialAwareness; using Microsoft.MixedReality.Toolkit.Utilities; -using System; +using Microsoft.MixedReality.Toolkit.Utilities.Editor; using UnityEditor; using UnityEngine; @@ -17,42 +17,47 @@ 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 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 static bool showEditorSettings = true; 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() { @@ -95,75 +100,23 @@ protected override void OnEnable() // 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(); + RenderTitleDescriptionAndLogo("Configuration Profile", string.Empty); if (!MixedRealityToolkit.IsInitialized) { 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(); + MixedRealityInspectorUtility.AddMixedRealityToolkitToScene(); + EditorGUIUtility.PingObject(MixedRealityToolkit.Instance); } } @@ -175,9 +128,7 @@ public override void OnInspectorGUI() if (GUILayout.Button("Copy & Customize")) { - var originalSelection = Selection.activeObject; - CreateCustomProfile(target as BaseMixedRealityProfile); - Selection.activeObject = originalSelection; + CreateCopyProfileValues(); } if (MixedRealityToolkit.IsInitialized) @@ -193,73 +144,181 @@ public override void OnInspectorGUI() } EditorGUILayout.EndHorizontal(); - EditorGUILayout.LabelField(string.Empty, GUI.skin.horizontalSlider); } - bool isGUIEnabled = !IsProfileLock((BaseMixedRealityProfile)target); - GUI.enabled = isGUIEnabled; + // We don't call the CheckLock method so won't get a duplicate message. + if (MixedRealityPreferences.LockProfiles && !((BaseMixedRealityProfile)target).IsCustomProfile) + { + GUI.enabled = false; + } + var previousLabelWidth = EditorGUIUtility.labelWidth; + EditorGUIUtility.labelWidth = 160f; EditorGUI.BeginChangeCheck(); bool changed = false; // Experience configuration + EditorGUILayout.Space(); ExperienceScale experienceScale = (ExperienceScale)targetExperienceScale.intValue; - EditorGUILayout.PropertyField(targetExperienceScale, TargetScaleContent); + 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; + } - string scaleDescription = GetExperienceDescription(experienceScale); - if (!string.IsNullOrEmpty(scaleDescription)) + if (scaleDescription != string.Empty) + { + GUILayout.Space(6f); + EditorGUILayout.HelpBox(scaleDescription, MessageType.Info); + } + } + } + + // Camera Profile configuration + EditorGUILayout.Space(); + showCameraProperties = EditorGUILayout.Foldout(showCameraProperties, "Camera Settings", true); + if (showCameraProperties) { - EditorGUILayout.HelpBox(scaleDescription, MessageType.Info); - EditorGUILayout.Space(); + using (new EditorGUI.IndentLevelScope()) + { + EditorGUILayout.PropertyField(enableCameraSystem); + EditorGUILayout.PropertyField(cameraSystemType); + changed |= RenderProfile(cameraProfile); + } } - EditorGUILayout.BeginHorizontal(); + // 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, true, typeof(IMixedRealityInputSystem)); + } + } - 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(); + // 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, true, typeof(IMixedRealityBoundarySystem)); + } + } + + // 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, true, typeof(IMixedRealitySpatialAwarenessSystem)); + } + } - EditorGUILayout.BeginVertical(EditorStyles.helpBox); + // Diagnostics System configuration + EditorGUILayout.Space(); + showDiagnosticProperties = EditorGUILayout.Foldout(showDiagnosticProperties, "Diagnostics System Settings", true); + if (showDiagnosticProperties) + { using (new EditorGUI.IndentLevelScope()) { - changed |= RenderProfileFuncs[SelectedProfileTab](); + 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.EndVertical(); - EditorGUILayout.EndHorizontal(); + } + + // Registered Services configuration + EditorGUILayout.Space(); + showRegisteredServiceProperties = EditorGUILayout.Foldout(showRegisteredServiceProperties, "Extension Services", true); + if (showRegisteredServiceProperties) + { + using (new EditorGUI.IndentLevelScope()) + { + changed |= RenderProfile(registeredServiceProvidersProfile); + } + } + + // Editor settings + EditorGUILayout.Space(); + showEditorSettings = EditorGUILayout.Foldout(showEditorSettings, "Editor Settings", true); + if (showEditorSettings) + { + using (new EditorGUI.IndentLevelScope()) + { + EditorGUILayout.PropertyField(useServiceInspectors); + } + } if (!changed) { changed |= EditorGUI.EndChangeCheck(); } + EditorGUIUtility.labelWidth = previousLabelWidth; serializedObject.ApplyModifiedProperties(); - GUI.enabled = true; 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; - } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs index 48275a13ab2..993a4b28bb2 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs @@ -32,7 +32,7 @@ public static bool CheckMixedRealityConfigured(bool renderEditorElements = true, if (showCreateButton && GUILayout.Button("Click here to add Mixed Reality Toolkit instance to scene")) { - new GameObject("MixedRealityToolkit").AddComponent(); + AddMixedRealityToolkitToScene(); } EditorGUILayout.Space(); } @@ -54,6 +54,17 @@ public static bool CheckMixedRealityConfigured(bool renderEditorElements = true, return true; } + /// + /// If MRTK is not initialized in scene, adds & initializes instance to current scene + /// + public static void AddMixedRealityToolkitToScene() + { + if (!MixedRealityToolkit.IsInitialized) + { + Selection.activeObject = new GameObject("MixedRealityToolkit").AddComponent(); + } + } + /// /// Found at https://answers.unity.com/questions/960413/editor-window-how-to-center-a-window.html /// From 3d17c4395c17e51c9b527865512234e312e3aa8f Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Tue, 21 May 2019 12:04:22 -0700 Subject: [PATCH 43/96] Merge branch 'mrtk_inspector_upgrade_pt4_5' into mrtk_inspector_upgrade_pt5 --- .../Handlers/PointerClickHandlerInspector.cs | 2 +- .../Handlers/SpeechInputHandlerInspector.cs | 3 +- ...dRealityInputSimulationProfileInspector.cs | 151 +++++----- .../BaseMixedRealityProfileInspector.cs | 15 +- ...ityToolkitConfigurationProfileInspector.cs | 151 ++++------ ...tyBoundaryVisualizationProfileInspector.cs | 119 ++++---- .../MixedRealityCameraProfileInspector.cs | 58 ++-- ...ealityControllerMappingProfileInspector.cs | 78 ++--- ...ControllerVisualizationProfileInspector.cs | 116 ++++---- ...ealityDiagnosticsSystemProfileInspector.cs | 57 ++-- ...MixedRealityEyeTrackingProfileInspector.cs | 31 +- .../MixedRealityGesturesProfileInspector.cs | 244 ++++++++-------- ...ixedRealityHandTrackingProfileInspector.cs | 41 ++- .../MixedRealityInputActionRulesInspector.cs | 225 +++++++------- ...ixedRealityInputActionsProfileInspector.cs | 107 ++++--- ...MixedRealityInputSystemProfileInspector.cs | 153 +++++----- .../MixedRealityMouseInputProfileInspector.cs | 27 +- .../MixedRealityPointerProfileInspector.cs | 86 +++--- ...gisteredServiceProviderProfileInspector.cs | 25 +- ...alAwarenessMeshObserverProfileInspector.cs | 98 ++++--- ...ySpatialAwarenessSystemProfileInspector.cs | 30 +- ...edRealitySpeechCommandsProfileInspector.cs | 233 ++++++++------- ...ityToolkitConfigurationProfileInspector.cs | 276 +++++++----------- .../Utilities/MixedRealityInspectorUtility.cs | 15 +- .../Utilities/Editor/GUIEnabledWrapper.cs | 50 ++++ .../Editor/GUIEnabledWrapper.cs.meta | 11 + .../Editor/MixedRealityEditorUtility.cs | 69 +++++ .../Editor/MixedRealityEditorUtility.cs.meta | 11 + .../Editor}/MixedRealityStylesUtility.cs | 12 +- .../Editor}/MixedRealityStylesUtility.cs.meta | 2 +- .../Setup/MixedRealityEditorSettings.cs | 4 +- .../Editor/Setup/MixedRealityOptimizeUtils.cs | 2 +- .../Setup/MixedRealityOptimizeWindow.cs | 36 +-- 33 files changed, 1306 insertions(+), 1232 deletions(-) create mode 100644 Assets/MixedRealityToolkit/Utilities/Editor/GUIEnabledWrapper.cs create mode 100644 Assets/MixedRealityToolkit/Utilities/Editor/GUIEnabledWrapper.cs.meta create mode 100644 Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityEditorUtility.cs create mode 100644 Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityEditorUtility.cs.meta rename Assets/MixedRealityToolkit/{Inspectors/Utilities => Utilities/Editor}/MixedRealityStylesUtility.cs (50%) rename Assets/MixedRealityToolkit/{Inspectors/Utilities => Utilities/Editor}/MixedRealityStylesUtility.cs.meta (83%) diff --git a/Assets/MixedRealityToolkit.SDK/Inspectors/Input/Handlers/PointerClickHandlerInspector.cs b/Assets/MixedRealityToolkit.SDK/Inspectors/Input/Handlers/PointerClickHandlerInspector.cs index ecefb408e8c..4e2f1f67e8b 100644 --- a/Assets/MixedRealityToolkit.SDK/Inspectors/Input/Handlers/PointerClickHandlerInspector.cs +++ b/Assets/MixedRealityToolkit.SDK/Inspectors/Input/Handlers/PointerClickHandlerInspector.cs @@ -26,7 +26,7 @@ public override void OnInspectorGUI() { base.OnInspectorGUI(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) { return; } + if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) { return; } serializedObject.Update(); EditorGUILayout.PropertyField(pointerUpProperty, true); diff --git a/Assets/MixedRealityToolkit.SDK/Inspectors/Input/Handlers/SpeechInputHandlerInspector.cs b/Assets/MixedRealityToolkit.SDK/Inspectors/Input/Handlers/SpeechInputHandlerInspector.cs index 8d6ccb751bc..5221ac8f961 100644 --- a/Assets/MixedRealityToolkit.SDK/Inspectors/Input/Handlers/SpeechInputHandlerInspector.cs +++ b/Assets/MixedRealityToolkit.SDK/Inspectors/Input/Handlers/SpeechInputHandlerInspector.cs @@ -37,7 +37,8 @@ protected override void OnEnable() public override void OnInspectorGUI() { base.OnInspectorGUI(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) + + if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) { return; } diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs index 5a122a36926..03eb7596013 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs @@ -3,8 +3,8 @@ using Microsoft.MixedReality.Toolkit.Editor; using Microsoft.MixedReality.Toolkit.Utilities.Editor; +using System.Linq; using UnityEditor; -using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Input { @@ -117,88 +117,93 @@ protected override void OnEnable() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) - { - return; - } + RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); serializedObject.Update(); - bool wasGUIEnabled = GUI.enabled; - bool isGUIEnabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - GUI.enabled = isGUIEnabled; - - EditorGUILayout.PropertyField(isCameraControlEnabled); - { - EditorGUILayout.BeginVertical("Label"); - GUI.enabled = isGUIEnabled && isCameraControlEnabled.boolValue; - - EditorGUILayout.PropertyField(extraMouseSensitivityScale); - EditorGUILayout.PropertyField(defaultMouseSensitivity); - EditorGUILayout.PropertyField(mouseLookButton); - EditorGUILayout.PropertyField(isControllerLookInverted); - EditorGUILayout.PropertyField(currentControlMode); - EditorGUILayout.PropertyField(fastControlKey); - EditorGUILayout.PropertyField(controlSlowSpeed); - EditorGUILayout.PropertyField(controlFastSpeed); - EditorGUILayout.PropertyField(moveHorizontal); - EditorGUILayout.PropertyField(moveVertical); - EditorGUILayout.PropertyField(mouseX); - EditorGUILayout.PropertyField(mouseY); - EditorGUILayout.PropertyField(lookHorizontal); - EditorGUILayout.PropertyField(lookVertical); - - EditorGUILayout.EndVertical(); - GUI.enabled = isGUIEnabled; - } - - EditorGUILayout.Space(); - EditorGUILayout.PropertyField(simulateEyePosition); - - EditorGUILayout.Space(); - EditorGUILayout.PropertyField(handSimulationMode); + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - EditorGUILayout.BeginVertical("Label"); - bool isHandSimEnabled = (handSimulationMode.enumValueIndex != (int)HandSimulationMode.Disabled); - GUI.enabled = isGUIEnabled && isHandSimEnabled; - - EditorGUILayout.PropertyField(toggleLeftHandKey); - EditorGUILayout.PropertyField(toggleRightHandKey); - EditorGUILayout.PropertyField(handHideTimeout); - EditorGUILayout.PropertyField(leftHandManipulationKey); - EditorGUILayout.PropertyField(rightHandManipulationKey); - EditorGUILayout.Space(); + EditorGUILayout.PropertyField(isCameraControlEnabled); + { + EditorGUILayout.BeginVertical("Label"); + using (new GUIEnabledWrapper(isCameraControlEnabled.boolValue)) + { + EditorGUILayout.PropertyField(extraMouseSensitivityScale); + EditorGUILayout.PropertyField(defaultMouseSensitivity); + EditorGUILayout.PropertyField(mouseLookButton); + EditorGUILayout.PropertyField(isControllerLookInverted); + EditorGUILayout.PropertyField(currentControlMode); + EditorGUILayout.PropertyField(fastControlKey); + EditorGUILayout.PropertyField(controlSlowSpeed); + EditorGUILayout.PropertyField(controlFastSpeed); + EditorGUILayout.PropertyField(moveHorizontal); + EditorGUILayout.PropertyField(moveVertical); + EditorGUILayout.PropertyField(mouseX); + EditorGUILayout.PropertyField(mouseY); + EditorGUILayout.PropertyField(lookHorizontal); + EditorGUILayout.PropertyField(lookVertical); + + EditorGUILayout.EndVertical(); + } + } - EditorGUILayout.PropertyField(defaultHandGesture); - EditorGUILayout.PropertyField(leftMouseHandGesture); - EditorGUILayout.PropertyField(middleMouseHandGesture); - EditorGUILayout.PropertyField(rightMouseHandGesture); - EditorGUILayout.PropertyField(handGestureAnimationSpeed); EditorGUILayout.Space(); + EditorGUILayout.PropertyField(simulateEyePosition); - EditorGUILayout.PropertyField(holdStartDuration); - EditorGUILayout.PropertyField(manipulationStartThreshold); EditorGUILayout.Space(); - - EditorGUILayout.PropertyField(defaultHandDistance); - EditorGUILayout.PropertyField(handDepthMultiplier); - EditorGUILayout.PropertyField(handJitterAmount); - EditorGUILayout.Space(); - - EditorGUILayout.PropertyField(yawHandCWKey); - EditorGUILayout.PropertyField(yawHandCCWKey); - EditorGUILayout.PropertyField(pitchHandCWKey); - EditorGUILayout.PropertyField(pitchHandCCWKey); - EditorGUILayout.PropertyField(rollHandCWKey); - EditorGUILayout.PropertyField(rollHandCCWKey); - EditorGUILayout.PropertyField(handRotationSpeed); - EditorGUILayout.Space(); - - EditorGUILayout.EndVertical(); - GUI.enabled = wasGUIEnabled; + EditorGUILayout.PropertyField(handSimulationMode); + { + EditorGUILayout.BeginVertical("Label"); + bool isHandSimEnabled = (handSimulationMode.enumValueIndex != (int)HandSimulationMode.Disabled); + using (new GUIEnabledWrapper(isHandSimEnabled)) + { + EditorGUILayout.PropertyField(toggleLeftHandKey); + EditorGUILayout.PropertyField(toggleRightHandKey); + EditorGUILayout.PropertyField(handHideTimeout); + EditorGUILayout.PropertyField(leftHandManipulationKey); + EditorGUILayout.PropertyField(rightHandManipulationKey); + EditorGUILayout.Space(); + + EditorGUILayout.PropertyField(defaultHandGesture); + EditorGUILayout.PropertyField(leftMouseHandGesture); + EditorGUILayout.PropertyField(middleMouseHandGesture); + EditorGUILayout.PropertyField(rightMouseHandGesture); + EditorGUILayout.PropertyField(handGestureAnimationSpeed); + EditorGUILayout.Space(); + + EditorGUILayout.PropertyField(holdStartDuration); + EditorGUILayout.PropertyField(manipulationStartThreshold); + EditorGUILayout.Space(); + + EditorGUILayout.PropertyField(defaultHandDistance); + EditorGUILayout.PropertyField(handDepthMultiplier); + EditorGUILayout.PropertyField(handJitterAmount); + EditorGUILayout.Space(); + + EditorGUILayout.PropertyField(yawHandCWKey); + EditorGUILayout.PropertyField(yawHandCCWKey); + EditorGUILayout.PropertyField(pitchHandCWKey); + EditorGUILayout.PropertyField(pitchHandCCWKey); + EditorGUILayout.PropertyField(rollHandCWKey); + EditorGUILayout.PropertyField(rollHandCCWKey); + EditorGUILayout.PropertyField(handRotationSpeed); + EditorGUILayout.Space(); + + EditorGUILayout.EndVertical(); + } + } + + serializedObject.ApplyModifiedProperties(); } + } - serializedObject.ApplyModifiedProperties(); + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.DataProviderConfigurations != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.DataProviderConfigurations.Any(s => profile == s.DeviceManagerProfile); } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs index 8c08abec5aa..8172f4174f2 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs @@ -1,12 +1,10 @@ // 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 System.Linq; using System.Text; -using System.Threading.Tasks; using UnityEditor; using UnityEngine; @@ -77,9 +75,9 @@ public static void RenderReadOnlyProfile(SerializedProperty property) /// 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, bool renderProfileInBox = false, Type serviceType = null) + protected static bool RenderProfile(SerializedProperty property, Type profileType, bool showAddButton = true, bool renderProfileInBox = false, Type serviceType = null) { - return RenderProfileInternal(property, showAddButton, renderProfileInBox, serviceType); + return RenderProfileInternal(property, profileType, showAddButton, renderProfileInBox, serviceType); } /// @@ -90,12 +88,18 @@ protected static bool RenderProfile(SerializedProperty property, bool showAddBut /// if true, render box around profile content, if false, don't /// Optional service type to limit available profile types. /// True, if the profile changed. - private static bool RenderProfileInternal(SerializedProperty property, bool showAddButton, bool renderProfileInBox, Type serviceType = null) + private static bool RenderProfileInternal(SerializedProperty property, Type profileType, + bool showAddButton, bool renderProfileInBox, Type serviceType = null) { var profile = property.serializedObject.targetObject as BaseMixedRealityProfile; bool changed = false; var oldObject = property.objectReferenceValue; + if (profileType != null && !profileType.IsSubclassOf(typeof(BaseMixedRealityProfile)) && profileType != typeof(BaseMixedRealityProfile)) + { + profileType = null; + } + // If we're constraining this to a service type, check whether the profile is valid // If it isn't, issue a warning. if (serviceType != null && oldObject != null) @@ -107,7 +111,6 @@ private static bool RenderProfileInternal(SerializedProperty property, bool show } // Find the profile type so we can limit the available object field options - Type profileType = null; if (serviceType != null) { // If GetProfileTypesForService has a count greater than one, then it won't be possible to use diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs index 491de893dfc..430dd478db1 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs @@ -2,10 +2,8 @@ // 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; namespace Microsoft.MixedReality.Toolkit.Editor { @@ -16,17 +14,14 @@ public abstract class BaseMixedRealityToolkitConfigurationProfileInspector : Bas { public bool RenderAsSubProfile { get; set; } - [SerializeField] - private Texture2D logoLightTheme = null; - - [SerializeField] - private Texture2D logoDarkTheme = null; - - [SerializeField] - private static Texture helpIcon = null; - private static GUIContent WarningIconContent = null; + /// + /// Helper function to determine if the current profile is assigned to the active instance of MRTK + /// + /// + protected abstract bool IsProfileInActiveInstance(); + /// /// Internal enum used for back navigation along profile hiearchy. /// Indicates what type of parent profile the current profile will return to for going back @@ -35,28 +30,20 @@ protected enum BackProfileType { Configuration, Input, + SpatialAwareness, RegisteredServices }; + // NOTE: Must match number of elements in BackProfileType + protected readonly string[] BackProfileDescriptions = { + "Back to Configuration Profile", + "Back to Input Profile", + "Back to Spatial Awareness Profile", + "Back to Registered Service Providers Profile" + }; + 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)); - } - - if (helpIcon == null) - { - helpIcon = EditorGUIUtility.IconContent("_Help").image; - } - if (WarningIconContent == null) { WarningIconContent = new GUIContent(EditorGUIUtility.IconContent("console.warnicon").image, @@ -67,7 +54,7 @@ protected virtual void Awake() /// /// Render the Mixed Reality Toolkit Logo. /// - protected void RenderMixedRealityToolkitLogo() + protected void RenderMRTKLogo() { // If we're being rendered as a sub profile, don't show the logo if (RenderAsSubProfile) @@ -75,31 +62,31 @@ protected void RenderMixedRealityToolkitLogo() return; } - GUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - GUILayout.Label(EditorGUIUtility.isProSkin ? logoDarkTheme : logoLightTheme, GUILayout.MaxHeight(96f)); - GUILayout.FlexibleSpace(); - GUILayout.EndHorizontal(); - GUILayout.Space(3f); + MixedRealityEditorUtility.RenderMixedRealityToolkitLogo(); } - protected bool DrawBacktrackProfileButton(BackProfileType returnProfileTarget = BackProfileType.Configuration) { - string backText = string.Empty; + // We cannot select the correct profile if there is no instance + if (!MixedRealityToolkit.IsInitialized) + { + return false; + } + + string backText = BackProfileDescriptions[(int)returnProfileTarget]; 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.SpatialAwareness: + backProfile = MixedRealityToolkit.Instance.ActiveProfile.SpatialAwarenessSystemProfile; + break; case BackProfileType.RegisteredServices: - backText = "Back to Registered Service Providers Profile"; backProfile = MixedRealityToolkit.Instance.ActiveProfile.RegisteredServiceProvidersProfile; break; } @@ -130,64 +117,45 @@ protected bool DrawBacktrackProfileButton(string message, UnityEngine.Object act return false; } - /// - /// Helper function to render buttons correctly indented according to EditorGUI.indentLevel since GUILayout component don't respond naturally - /// - /// text to place in button - /// layout options - /// true if button clicked, false if otherwise - protected static bool RenderIndentedButton(string buttonText, params GUILayoutOption[] options) - { - 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 + /// profile properties are full initialized for rendering /// 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) + protected void RenderProfileHeader(string title, string description, bool isProfileInitialized = true, BackProfileType returnProfileTarget = BackProfileType.Configuration) { - RenderMixedRealityToolkitLogo(); + RenderMRTKLogo(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured()) + var profile = target as BaseMixedRealityProfile; + if (!RenderAsSubProfile && !profile.IsCustomProfile) { - return false; + EditorGUILayout.HelpBox("Default Mixed Reality Toolkit profiles cannot be edited", MessageType.Warning); + // TODO: Place clone button. MixedRealityProfileCloneWindow requires parent profile though which is not known here + //EditorGUILayout.HelpBox("Default MRTK profiles cannot be edited. Create a clone of this profile to modify settings.", MessageType.Warning); } - - if (DrawBacktrackProfileButton(returnProfileTarget)) + else { - return false; + if (!isProfileInitialized && profile.IsCustomProfile) + { + EditorGUILayout.HelpBox("Some properties may not be editable in this profile. Please refer to the error messages below to resolve editing.", MessageType.Warning); + } + + MixedRealityInspectorUtility.CheckMixedRealityConfigured(false, false); + + if (MixedRealityToolkit.IsInitialized) + { + if (IsProfileInActiveInstance()) + { + DrawBacktrackProfileButton(returnProfileTarget); + } + else if (!isProfileInitialized) + { + EditorGUILayout.HelpBox("This profile is not assigned to the active MRTK instance in this scene. Some properties may not be editable", MessageType.Error); + } + } } EditorGUILayout.BeginHorizontal(); @@ -195,8 +163,17 @@ protected bool RenderProfileHeader(string title, string description, BackProfile EditorGUILayout.EndHorizontal(); EditorGUILayout.LabelField(string.Empty, GUI.skin.horizontalSlider); + } - return true; + /// + /// If MRTK is in scene & input system is disabled, then show error message + /// + protected void RenderMixedRealityInputConfigured() + { + if (MixedRealityToolkit.IsInitialized && !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); + } } } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs index aaddfec1620..ce6dcd4e46b 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs @@ -72,68 +72,71 @@ protected override void OnEnable() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) - { - return; - } - - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - serializedObject.Update(); - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("General Settings", EditorStyles.boldLabel); - { - EditorGUILayout.PropertyField(boundaryHeight); - } + RenderProfileHeader(ProfileTitle, ProfileDescription); - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Floor Settings", EditorStyles.boldLabel); + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - 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); + serializedObject.Update(); + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("General Settings", EditorStyles.boldLabel); + { + EditorGUILayout.PropertyField(boundaryHeight); + } + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Floor Settings", EditorStyles.boldLabel); + { + 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(); + EditorGUILayout.LabelField("Play Area Settings", EditorStyles.boldLabel); + { + EditorGUILayout.PropertyField(showPlayArea, showContent); + EditorGUILayout.PropertyField(playAreaMaterial, materialContent); + EditorGUILayout.PropertyField(playAreaPhysicsLayer); + } + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Tracked Area Settings", EditorStyles.boldLabel); + { + EditorGUILayout.PropertyField(showTrackedArea, showContent); + EditorGUILayout.PropertyField(trackedAreaMaterial, materialContent); + EditorGUILayout.PropertyField(trackedAreaPhysicsLayer); + } + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Boundary Wall Settings", EditorStyles.boldLabel); + { + EditorGUILayout.PropertyField(showBoundaryWalls, showContent); + EditorGUILayout.PropertyField(boundaryWallMaterial, materialContent); + EditorGUILayout.PropertyField(boundaryWallsPhysicsLayer); + } + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Boundary Ceiling Settings", EditorStyles.boldLabel); + { + EditorGUILayout.PropertyField(showBoundaryCeiling, showContent); + EditorGUILayout.PropertyField(boundaryCeilingMaterial, materialContent); + EditorGUILayout.PropertyField(ceilingPhysicsLayer); + } + + serializedObject.ApplyModifiedProperties(); } + } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Play Area Settings", EditorStyles.boldLabel); - { - EditorGUILayout.PropertyField(showPlayArea, showContent); - EditorGUILayout.PropertyField(playAreaMaterial, materialContent); - EditorGUILayout.PropertyField(playAreaPhysicsLayer); - } - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Tracked Area Settings", EditorStyles.boldLabel); - { - EditorGUILayout.PropertyField(showTrackedArea, showContent); - EditorGUILayout.PropertyField(trackedAreaMaterial, materialContent); - EditorGUILayout.PropertyField(trackedAreaPhysicsLayer); - } - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Boundary Wall Settings", EditorStyles.boldLabel); - { - EditorGUILayout.PropertyField(showBoundaryWalls, showContent); - EditorGUILayout.PropertyField(boundaryWallMaterial, materialContent); - EditorGUILayout.PropertyField(boundaryWallsPhysicsLayer); - } - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Boundary Ceiling Settings", EditorStyles.boldLabel); - { - EditorGUILayout.PropertyField(showBoundaryCeiling, showContent); - EditorGUILayout.PropertyField(boundaryCeilingMaterial, materialContent); - EditorGUILayout.PropertyField(ceilingPhysicsLayer); - } - - serializedObject.ApplyModifiedProperties(); - - GUI.enabled = wasGUIEnabled; + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.BoundaryVisualizationProfile; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs index 8b5ce476f0c..ef3a5422ed7 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs @@ -43,45 +43,49 @@ protected override void OnEnable() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) - { - return; - } - - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - serializedObject.Update(); + RenderProfileHeader(ProfileTitle, ProfileDescription); - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Opaque Display Settings", EditorStyles.boldLabel); + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - EditorGUILayout.PropertyField(opaqueNearClip, nearClipTitle); - EditorGUILayout.PropertyField(opaqueClearFlags, clearFlagsTitle); + serializedObject.Update(); - if ((CameraClearFlags)opaqueClearFlags.intValue == CameraClearFlags.Color) + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Opaque Display Settings", EditorStyles.boldLabel); { - opaqueBackgroundColor.colorValue = EditorGUILayout.ColorField("Background Color", opaqueBackgroundColor.colorValue); - } + EditorGUILayout.PropertyField(opaqueNearClip, nearClipTitle); + EditorGUILayout.PropertyField(opaqueClearFlags, clearFlagsTitle); - opaqueQualityLevel.intValue = EditorGUILayout.Popup("Quality Setting", opaqueQualityLevel.intValue, QualitySettings.names); - } + if ((CameraClearFlags)opaqueClearFlags.intValue == CameraClearFlags.Color) + { + opaqueBackgroundColor.colorValue = EditorGUILayout.ColorField("Background Color", opaqueBackgroundColor.colorValue); + } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Transparent Display Settings", EditorStyles.boldLabel); - { - EditorGUILayout.PropertyField(transparentNearClip, nearClipTitle); - EditorGUILayout.PropertyField(transparentClearFlags, clearFlagsTitle); + opaqueQualityLevel.intValue = EditorGUILayout.Popup("Quality Setting", opaqueQualityLevel.intValue, QualitySettings.names); + } - if ((CameraClearFlags)transparentClearFlags.intValue == CameraClearFlags.Color) + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Transparent Display Settings", EditorStyles.boldLabel); { - transparentBackgroundColor.colorValue = EditorGUILayout.ColorField("Background Color", transparentBackgroundColor.colorValue); + 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); } - holoLensQualityLevel.intValue = EditorGUILayout.Popup("Quality Setting", holoLensQualityLevel.intValue, QualitySettings.names); + serializedObject.ApplyModifiedProperties(); } + } - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.CameraProfile; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs index c9131befd0f..4f2ec726850 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs @@ -37,92 +37,50 @@ public ControllerRenderProfile(SupportedControllerType supportedControllerType, private static MixedRealityControllerMappingProfile thisProfile; private SerializedProperty mixedRealityControllerMappingProfiles; - 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(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) - { - return; - } - mixedRealityControllerMappingProfiles = serializedObject.FindProperty("mixedRealityControllerMappingProfiles"); - - if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled || - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null) - { - return; - } - thisProfile = target as MixedRealityControllerMappingProfile; - defaultLabelWidth = EditorGUIUtility.labelWidth; - defaultFieldWidth = EditorGUIUtility.fieldWidth; } public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) - { - return; - } + RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); - if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target), false)) { - EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); - return; - } + serializedObject.Update(); - 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; - } + RenderControllerList(mixedRealityControllerMappingProfiles); - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - serializedObject.Update(); - - RenderControllerList(mixedRealityControllerMappingProfiles); + serializedObject.ApplyModifiedProperties(); + } + } - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.ControllerMappingProfile; } private void RenderControllerList(SerializedProperty controllerList) { if (thisProfile.MixedRealityControllerMappingProfiles.Length != controllerList.arraySize) { return; } - if (RenderIndentedButton(ControllerAddButtonContent, EditorStyles.miniButton)) + if (MixedRealityEditorUtility.RenderIndentedButton(ControllerAddButtonContent, EditorStyles.miniButton)) { AddController(controllerList, typeof(GenericJoystickController)); return; @@ -271,12 +229,12 @@ private void RenderControllerList(SerializedProperty controllerList) return; } - if (RenderIndentedButton("Edit Input Action Map")) + if (MixedRealityEditorUtility.RenderIndentedButton("Edit Input Action Map")) { ControllerPopupWindow.Show(controllerMapping, interactionsProperty, handedness); } - if (RenderIndentedButton("Reset Input Actions")) + if (MixedRealityEditorUtility.RenderIndentedButton("Reset Input Actions")) { interactionsProperty.ClearArray(); serializedObject.ApplyModifiedProperties(); @@ -301,7 +259,7 @@ private void RenderControllerList(SerializedProperty controllerList) var buttonContent = new GUIContent(controllerTitle, ControllerMappingLibrary.GetControllerTextureScaled(controllerType, handedness)); - if (GUILayout.Button(buttonContent, controllerButtonStyle, GUILayout.Height(128f), GUILayout.MinWidth(32f), GUILayout.ExpandWidth(true))) + if (GUILayout.Button(buttonContent, MixedRealityStylesUtility.ControllerButtonStyle, GUILayout.Height(128f), GUILayout.MinWidth(32f), GUILayout.ExpandWidth(true))) { ControllerPopupWindow.Show(controllerMapping, interactionsProperty, handedness); } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs index 87402960f7f..d3a2cc8a587 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs @@ -64,87 +64,79 @@ protected override void OnEnable() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) - { - return; - } + RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); - if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); - return; - } + serializedObject.Update(); - 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.LabelField("Visualization Settings", EditorStyles.boldLabel); + { + EditorGUILayout.PropertyField(renderMotionControllers); - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - serializedObject.Update(); + EditorGUILayout.PropertyField(defaultControllerVisualizationType); - EditorGUILayout.LabelField("Visualization Settings", EditorStyles.boldLabel); - { - EditorGUILayout.PropertyField(renderMotionControllers); + if (thisProfile.DefaultControllerVisualizationType == null || + thisProfile.DefaultControllerVisualizationType.Type == null) + { + EditorGUILayout.HelpBox("A default controller visualization type must be defined!", MessageType.Error); + } + } - EditorGUILayout.PropertyField(defaultControllerVisualizationType); + var leftHandModelPrefab = globalLeftHandedControllerModel.objectReferenceValue as GameObject; + var rightHandModelPrefab = globalRightHandedControllerModel.objectReferenceValue as GameObject; - if (thisProfile.DefaultControllerVisualizationType == null || - thisProfile.DefaultControllerVisualizationType.Type == null) + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Controller Model Settings", EditorStyles.boldLabel); { - EditorGUILayout.HelpBox("A default controller visualization type must be defined!", MessageType.Error); - } - } - - var leftHandModelPrefab = globalLeftHandedControllerModel.objectReferenceValue as GameObject; - var rightHandModelPrefab = globalRightHandedControllerModel.objectReferenceValue as GameObject; + EditorGUILayout.PropertyField(useDefaultModels); - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Controller Model Settings", EditorStyles.boldLabel); - { - 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); + } - 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; - 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 (EditorGUI.EndChangeCheck() && CheckVisualizer(leftHandModelPrefab)) + { + globalLeftHandedControllerModel.objectReferenceValue = leftHandModelPrefab; + } - if (EditorGUI.EndChangeCheck() && CheckVisualizer(leftHandModelPrefab)) - { - globalLeftHandedControllerModel.objectReferenceValue = leftHandModelPrefab; - } + 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; - 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(rightHandModelPrefab)) + { + globalRightHandedControllerModel.objectReferenceValue = rightHandModelPrefab; + } - if (EditorGUI.EndChangeCheck() && CheckVisualizer(rightHandModelPrefab)) - { - globalRightHandedControllerModel.objectReferenceValue = rightHandModelPrefab; + EditorGUILayout.PropertyField(globalLeftHandModel); + EditorGUILayout.PropertyField(globalRightHandModel); } - EditorGUILayout.PropertyField(globalLeftHandModel); - EditorGUILayout.PropertyField(globalRightHandModel); - } - - EditorGUIUtility.labelWidth = defaultLabelWidth; + EditorGUIUtility.labelWidth = defaultLabelWidth; - EditorGUILayout.Space(); - showControllerDefinitions = EditorGUILayout.Foldout(showControllerDefinitions, "Controller Definitions", true); - if (showControllerDefinitions) - { - using (new EditorGUI.IndentLevelScope()) + EditorGUILayout.Space(); + showControllerDefinitions = EditorGUILayout.Foldout(showControllerDefinitions, "Controller Definitions", true); + if (showControllerDefinitions) { - RenderControllerList(controllerVisualizationSettings); + using (new EditorGUI.IndentLevelScope()) + { + RenderControllerList(controllerVisualizationSettings); + } } - } - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; + serializedObject.ApplyModifiedProperties(); + } + } + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.ControllerVisualizationProfile; } private void RenderControllerList(SerializedProperty controllerList) @@ -153,7 +145,7 @@ private void RenderControllerList(SerializedProperty controllerList) EditorGUILayout.Space(); - if (RenderIndentedButton(ControllerAddButtonContent, EditorStyles.miniButton)) + if (MixedRealityEditorUtility.RenderIndentedButton(ControllerAddButtonContent, EditorStyles.miniButton)) { controllerList.InsertArrayElementAtIndex(controllerList.arraySize); var index = controllerList.arraySize - 1; diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs index 57ce9a6cab5..830c3678856 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs @@ -12,17 +12,12 @@ namespace Microsoft.MixedReality.Toolkit.Diagnostics.Editor public class MixedRealityDiagnosticsSystemProfileInspector : BaseMixedRealityToolkitConfigurationProfileInspector { 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."; @@ -37,59 +32,53 @@ protected override void OnEnable() 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() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) - { - return; - } + RenderProfileHeader(ProfileTitle, ProfileDescription); - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - serializedObject.Update(); - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("General Settings", EditorStyles.boldLabel); + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - EditorGUILayout.PropertyField(showDiagnostics); - if(!showDiagnostics.boolValue) + serializedObject.Update(); + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("General Settings", EditorStyles.boldLabel); { - EditorGUILayout.Space(); - EditorGUILayout.HelpBox("Diagnostic visualizations have been globally disabled.", MessageType.Info); - EditorGUILayout.Space(); + EditorGUILayout.PropertyField(showDiagnostics); + if (!showDiagnostics.boolValue) + { + EditorGUILayout.Space(); + EditorGUILayout.HelpBox("Diagnostic visualizations have been globally disabled.", MessageType.Info); + EditorGUILayout.Space(); + } } - } - EditorGUILayout.Space(); - showProfilerSettings = EditorGUILayout.Foldout(showProfilerSettings, "Profiler Settings", true); - if (showProfilerSettings) - { - using (new EditorGUI.IndentLevelScope()) + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Profiler Settings", EditorStyles.boldLabel); { 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(); } + } - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs index a8f4074b5f1..9f0ac28a03e 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs @@ -1,11 +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.Input; using Microsoft.MixedReality.Toolkit.Editor; +using Microsoft.MixedReality.Toolkit.Input; using Microsoft.MixedReality.Toolkit.Utilities.Editor; +using System.Linq; using UnityEditor; -using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Inspectors { @@ -19,27 +19,28 @@ public class MixedRealityEyeTrackingProfileInspector : BaseMixedRealityToolkitCo protected override void OnEnable() { base.OnEnable(); - - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) { return; } - smoothEyeTracking = serializedObject.FindProperty("smoothEyeTracking"); } public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, string.Empty, BackProfileType.RegisteredServices)) + RenderProfileHeader(ProfileTitle, string.Empty, true, BackProfileType.Input); + + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - return; + serializedObject.Update(); + EditorGUILayout.PropertyField(smoothEyeTracking); + serializedObject.ApplyModifiedProperties(); } + } - serializedObject.Update(); - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("General settings", EditorStyles.boldLabel); - EditorGUILayout.PropertyField(smoothEyeTracking); - - serializedObject.ApplyModifiedProperties(); - GUI.enabled = true; + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.DataProviderConfigurations != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.DataProviderConfigurations.Any(s => profile == s.DeviceManagerProfile); } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs index 5fbb0101dfd..ac99ea5d3c0 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs @@ -36,12 +36,13 @@ public class MixedRealityGesturesProfileInspector : BaseMixedRealityToolkitConfi private static int[] allGestureIds; private static GUIContent[] actionLabels; private static int[] actionIds; + private bool isInitialized = false; protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) { return; } + isInitialized = false; gestures = serializedObject.FindProperty("gestures"); windowsManipulationGestureSettings = serializedObject.FindProperty("manipulationGestures"); @@ -53,18 +54,26 @@ protected override void OnEnable() thisProfile = target as MixedRealityGesturesProfile; Debug.Assert(thisProfile != null); - if (MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled && - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile != null) + UpdateGestureLabels(); + + if (!IsProfileInActiveInstance()) { - actionLabels = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions - .Select(action => new GUIContent(action.Description)) - .Prepend(new GUIContent("None")).ToArray(); - actionIds = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions - .Select(action => (int)action.Id) - .Prepend(0).ToArray(); + return; } - UpdateGestureLabels(); + var inputActions = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions; + actionLabels = inputActions.Select(action => new GUIContent(action.Description)).Prepend(new GUIContent("None")).ToArray(); + actionIds = inputActions.Select(action => (int)action.Id).Prepend(0).ToArray(); + + isInitialized = true; + } + + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.GesturesProfile; } private void UpdateGestureLabels() @@ -90,145 +99,148 @@ private void UpdateGestureLabels() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) - { - return; - } + RenderProfileHeader(ProfileTitle, ProfileDescription, isInitialized, BackProfileType.Input); + + RenderMixedRealityInputConfigured(); - if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) + if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(true, true)) { - EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); return; } - + 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(); + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target), false)) + { + serializedObject.Update(); - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Windows Gesture Settings", EditorStyles.boldLabel); - EditorGUILayout.PropertyField(windowsManipulationGestureSettings); - EditorGUILayout.PropertyField(windowsNavigationGestureSettings); - EditorGUILayout.PropertyField(useRailsNavigation); - EditorGUILayout.PropertyField(windowsRailsNavigationGestures); - EditorGUILayout.PropertyField(windowsGestureAutoStart); + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Windows Gesture Settings", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(windowsManipulationGestureSettings); + EditorGUILayout.PropertyField(windowsNavigationGestureSettings); + EditorGUILayout.PropertyField(useRailsNavigation); + EditorGUILayout.PropertyField(windowsRailsNavigationGestures); + EditorGUILayout.PropertyField(windowsGestureAutoStart); - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Defined Recognizable Gestures", EditorStyles.boldLabel); + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Defined Recognizable Gestures", EditorStyles.boldLabel); - RenderList(gestures); + RenderList(gestures); - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; + serializedObject.ApplyModifiedProperties(); + } } private void RenderList(SerializedProperty list) { - EditorGUILayout.Space(); - GUILayout.BeginVertical(); - - if (RenderIndentedButton(AddButtonContent, EditorStyles.miniButton)) + // Disable gestures list if we could not initialize successfully + using (new GUIEnabledWrapper(isInitialized, false)) { - list.arraySize += 1; - var speechCommand = list.GetArrayElementAtIndex(list.arraySize - 1); - var keyword = speechCommand.FindPropertyRelative("description"); - keyword.stringValue = string.Empty; - var gestureType = speechCommand.FindPropertyRelative("gestureType"); - gestureType.intValue = (int)GestureInputType.None; - var action = speechCommand.FindPropertyRelative("action"); - var actionId = action.FindPropertyRelative("id"); - actionId.intValue = 0; - var actionDescription = action.FindPropertyRelative("description"); - actionDescription.stringValue = string.Empty; - var actionConstraint = action.FindPropertyRelative("axisConstraint"); - actionConstraint.intValue = 0; - } + EditorGUILayout.Space(); + GUILayout.BeginVertical(); - if (list == null || list.arraySize == 0) - { - EditorGUILayout.HelpBox("Define a new Gesture.", MessageType.Warning); - GUILayout.EndVertical(); - UpdateGestureLabels(); - return; - } - - GUILayout.BeginVertical(); - - GUILayout.BeginHorizontal(); - var labelWidth = EditorGUIUtility.labelWidth; - EditorGUIUtility.labelWidth = 24f; - EditorGUILayout.LabelField(DescriptionContent, GUILayout.ExpandWidth(true)); - EditorGUILayout.LabelField(GestureTypeContent, GUILayout.Width(80f)); - EditorGUILayout.LabelField(ActionContent, GUILayout.Width(64f)); - EditorGUILayout.LabelField(string.Empty, GUILayout.Width(24f)); - EditorGUIUtility.labelWidth = labelWidth; - GUILayout.EndHorizontal(); - - for (int i = 0; i < list.arraySize; i++) - { - EditorGUILayout.BeginHorizontal(); - SerializedProperty gesture = list.GetArrayElementAtIndex(i); - var keyword = gesture.FindPropertyRelative("description"); - var gestureType = gesture.FindPropertyRelative("gestureType"); - var action = gesture.FindPropertyRelative("action"); - var actionId = action.FindPropertyRelative("id"); - var actionDescription = action.FindPropertyRelative("description"); - var actionConstraint = action.FindPropertyRelative("axisConstraint"); - - EditorGUILayout.PropertyField(keyword, GUIContent.none, GUILayout.ExpandWidth(true)); - - Debug.Assert(allGestureLabels.Length == allGestureIds.Length); - - var gestureLabels = new GUIContent[allGestureLabels.Length + 1]; - var gestureIds = new int[allGestureIds.Length + 1]; - - gestureLabels[0] = new GUIContent(((GestureInputType)gestureType.intValue).ToString()); - gestureIds[0] = gestureType.intValue; - - for (int j = 0; j < allGestureLabels.Length; j++) + if (MixedRealityEditorUtility.RenderIndentedButton(AddButtonContent, EditorStyles.miniButton)) { - gestureLabels[j + 1] = allGestureLabels[j]; - gestureIds[j + 1] = allGestureIds[j]; + list.arraySize += 1; + var speechCommand = list.GetArrayElementAtIndex(list.arraySize - 1); + var keyword = speechCommand.FindPropertyRelative("description"); + keyword.stringValue = string.Empty; + var gestureType = speechCommand.FindPropertyRelative("gestureType"); + gestureType.intValue = (int)GestureInputType.None; + var action = speechCommand.FindPropertyRelative("action"); + var actionId = action.FindPropertyRelative("id"); + actionId.intValue = 0; + var actionDescription = action.FindPropertyRelative("description"); + actionDescription.stringValue = string.Empty; + var actionConstraint = action.FindPropertyRelative("axisConstraint"); + actionConstraint.intValue = 0; } - EditorGUI.BeginChangeCheck(); - gestureType.intValue = EditorGUILayout.IntPopup(GUIContent.none, gestureType.intValue, gestureLabels, gestureIds, GUILayout.Width(80f)); - - if (EditorGUI.EndChangeCheck()) + if (list == null || list.arraySize == 0) { - serializedObject.ApplyModifiedProperties(); + EditorGUILayout.HelpBox("Define a new Gesture.", MessageType.Warning); + GUILayout.EndVertical(); UpdateGestureLabels(); + return; } - EditorGUI.BeginChangeCheck(); - actionId.intValue = EditorGUILayout.IntPopup(GUIContent.none, actionId.intValue, actionLabels, actionIds, GUILayout.Width(64f)); + GUILayout.BeginVertical(); - if (EditorGUI.EndChangeCheck()) - { - MixedRealityInputAction inputAction = actionId.intValue == 0 ? MixedRealityInputAction.None : MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions[actionId.intValue - 1]; - actionDescription.stringValue = inputAction.Description; - actionConstraint.enumValueIndex = (int)inputAction.AxisConstraint; - serializedObject.ApplyModifiedProperties(); - } + GUILayout.BeginHorizontal(); + var labelWidth = EditorGUIUtility.labelWidth; + EditorGUIUtility.labelWidth = 24f; + EditorGUILayout.LabelField(DescriptionContent, GUILayout.ExpandWidth(true)); + EditorGUILayout.LabelField(GestureTypeContent, GUILayout.Width(80f)); + EditorGUILayout.LabelField(ActionContent, GUILayout.Width(64f)); + EditorGUILayout.LabelField(string.Empty, GUILayout.Width(24f)); + EditorGUIUtility.labelWidth = labelWidth; + GUILayout.EndHorizontal(); - if (GUILayout.Button(MinusButtonContent, EditorStyles.miniButtonRight, GUILayout.Width(24f))) + for (int i = 0; i < list.arraySize; i++) { - list.DeleteArrayElementAtIndex(i); - serializedObject.ApplyModifiedProperties(); - UpdateGestureLabels(); + EditorGUILayout.BeginHorizontal(); + SerializedProperty gesture = list.GetArrayElementAtIndex(i); + var keyword = gesture.FindPropertyRelative("description"); + var gestureType = gesture.FindPropertyRelative("gestureType"); + var action = gesture.FindPropertyRelative("action"); + var actionId = action.FindPropertyRelative("id"); + var actionDescription = action.FindPropertyRelative("description"); + var actionConstraint = action.FindPropertyRelative("axisConstraint"); + + EditorGUILayout.PropertyField(keyword, GUIContent.none, GUILayout.ExpandWidth(true)); + + Debug.Assert(allGestureLabels.Length == allGestureIds.Length); + + var gestureLabels = new GUIContent[allGestureLabels.Length + 1]; + var gestureIds = new int[allGestureIds.Length + 1]; + + gestureLabels[0] = new GUIContent(((GestureInputType)gestureType.intValue).ToString()); + gestureIds[0] = gestureType.intValue; + + for (int j = 0; j < allGestureLabels.Length; j++) + { + gestureLabels[j + 1] = allGestureLabels[j]; + gestureIds[j + 1] = allGestureIds[j]; + } + + EditorGUI.BeginChangeCheck(); + gestureType.intValue = EditorGUILayout.IntPopup(GUIContent.none, gestureType.intValue, gestureLabels, gestureIds, GUILayout.Width(80f)); + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + UpdateGestureLabels(); + } + + EditorGUI.BeginChangeCheck(); + + actionId.intValue = EditorGUILayout.IntPopup(GUIContent.none, actionId.intValue, actionLabels, actionIds, GUILayout.Width(64f)); + + if (EditorGUI.EndChangeCheck()) + { + MixedRealityInputAction inputAction = actionId.intValue == 0 ? MixedRealityInputAction.None : MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions[actionId.intValue - 1]; + actionDescription.stringValue = inputAction.Description; + actionConstraint.enumValueIndex = (int)inputAction.AxisConstraint; + serializedObject.ApplyModifiedProperties(); + } + + if (GUILayout.Button(MinusButtonContent, EditorStyles.miniButtonRight, GUILayout.Width(24f))) + { + list.DeleteArrayElementAtIndex(i); + serializedObject.ApplyModifiedProperties(); + UpdateGestureLabels(); + } + + EditorGUILayout.EndHorizontal(); } - EditorGUILayout.EndHorizontal(); + GUILayout.EndVertical(); + GUILayout.EndVertical(); } - - GUILayout.EndVertical(); - GUILayout.EndVertical(); } } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs index ebe386e8e71..6d2665ca79c 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs @@ -5,7 +5,6 @@ using Microsoft.MixedReality.Toolkit.Input; using Microsoft.MixedReality.Toolkit.Utilities.Editor; using UnityEditor; -using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Inspectors { @@ -36,31 +35,31 @@ protected override void OnEnable() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) - { - return; - } + RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); - if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); - return; - } + serializedObject.Update(); - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - serializedObject.Update(); + EditorGUILayout.LabelField("General settings", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(jointPrefab); + EditorGUILayout.PropertyField(palmPrefab); + EditorGUILayout.PropertyField(fingertipPrefab); + EditorGUILayout.PropertyField(handMeshPrefab); + EditorGUILayout.PropertyField(enableHandMeshVisualization); + EditorGUILayout.PropertyField(enableHandJointVisualization); - EditorGUILayout.LabelField("General settings", EditorStyles.boldLabel); - EditorGUILayout.PropertyField(jointPrefab); - EditorGUILayout.PropertyField(palmPrefab); - EditorGUILayout.PropertyField(fingertipPrefab); - EditorGUILayout.PropertyField(handMeshPrefab); - EditorGUILayout.PropertyField(enableHandMeshVisualization); - EditorGUILayout.PropertyField(enableHandJointVisualization); + serializedObject.ApplyModifiedProperties(); + } + } - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && + profile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.HandTrackingProfile; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs index 109c7daa431..e5b327027ef 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs @@ -31,43 +31,41 @@ public class MixedRealityInputActionRulesInspector : BaseMixedRealityToolkitConf private SerializedProperty inputActionRulesQuaternionAxis; private SerializedProperty inputActionRulesPoseAxis; - private int[] baseActionIds; - private string[] baseActionLabels; + private int[] baseActionIds = new int[0]; + private string[] baseActionLabels = new string[0]; + + // These are marked as static because this inspector will reset itself every refresh + // because it can be rendered as a sub-profile and thus OnEnable() is called everytime private static int[] ruleActionIds = new int[0]; private static string[] ruleActionLabels = new string[0]; - private int selectedBaseActionId = 0; - private int selectedRuleActionId = 0; + private static int selectedBaseActionId = 0; + private static int selectedRuleActionId = 0; private static MixedRealityInputAction currentBaseAction = MixedRealityInputAction.None; private static MixedRealityInputAction currentRuleAction = MixedRealityInputAction.None; - private bool currentBoolCriteria; - private float currentSingleAxisCriteria; - private Vector2 currentDualAxisCriteria; - private Vector3 currentVectorCriteria; - private Quaternion currentQuaternionCriteria; - private MixedRealityPose currentPoseCriteria; + private static bool currentBoolCriteria; + private static float currentSingleAxisCriteria; + private static Vector2 currentDualAxisCriteria; + private static Vector3 currentVectorCriteria; + private static Quaternion currentQuaternionCriteria; + private static MixedRealityPose currentPoseCriteria; - private bool[] digitalFoldouts; - private bool[] singleAxisFoldouts; - private bool[] dualAxisFoldouts; - private bool[] vectorFoldouts; - private bool[] quaternionFoldouts; - private bool[] poseFoldouts; + private static bool[] digitalFoldouts; + private static bool[] singleAxisFoldouts; + private static bool[] dualAxisFoldouts; + private static bool[] vectorFoldouts; + private static bool[] quaternionFoldouts; + private static bool[] poseFoldouts; private MixedRealityInputActionRulesProfile thisProfile; + private bool isInitialized = false; protected override void OnEnable() { base.OnEnable(); - - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false) || - !MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled || - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null) - { - return; - } + isInitialized = false; inputActionRulesDigital = serializedObject.FindProperty("inputActionRulesDigital"); inputActionRulesSingleAxis = serializedObject.FindProperty("inputActionRulesSingleAxis"); @@ -76,89 +74,106 @@ protected override void OnEnable() inputActionRulesQuaternionAxis = serializedObject.FindProperty("inputActionRulesQuaternionAxis"); inputActionRulesPoseAxis = serializedObject.FindProperty("inputActionRulesPoseAxis"); - baseActionLabels = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions - .Where(action => action.AxisConstraint != AxisType.None && action.AxisConstraint != AxisType.Raw) - .Select(action => action.Description) - .ToArray(); + thisProfile = target as MixedRealityInputActionRulesProfile; + + // Only reset if we have not yet + if (digitalFoldouts == null) + { + ResetCriteria(); + } + + if (!MixedRealityToolkit.IsInitialized || + !MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled || + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null || + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionRulesProfile != thisProfile ) + { + return; + } - baseActionIds = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions - .Where(action => action.AxisConstraint != AxisType.None && action.AxisConstraint != AxisType.Raw) - .Select(action => (int)action.Id) - .ToArray(); + var inputActions = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions; + baseActionLabels = inputActions.Where(action => action.AxisConstraint != AxisType.None && action.AxisConstraint != AxisType.Raw) + .Select(action => action.Description).ToArray(); - thisProfile = target as MixedRealityInputActionRulesProfile; + baseActionIds = inputActions.Where(action => action.AxisConstraint != AxisType.None && action.AxisConstraint != AxisType.Raw) + .Select(action => (int)action.Id).ToArray(); - ResetCriteria(); + isInitialized = true; } public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) - { - return; - } + RenderProfileHeader(ProfileTitle, ProfileDescription, isInitialized, BackProfileType.Input); + + RenderMixedRealityInputConfigured(); - if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) + if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(true, true)) { - EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); return; } if (MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null) { EditorGUILayout.HelpBox("No Input Actions profile was specified.", MessageType.Error); - return; } - bool wasGUIlocked = GUI.enabled; - bool isGuiLocked = wasGUIlocked && !IsProfileLock((BaseMixedRealityProfile)target); - GUI.enabled = isGuiLocked; - serializedObject.Update(); + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target), false)) + { + serializedObject.Update(); - selectedBaseActionId = RenderBaseInputAction(selectedBaseActionId, out currentBaseAction); - GUI.enabled = isGuiLocked && currentBaseAction != MixedRealityInputAction.None; - RenderCriteriaField(currentBaseAction); + selectedBaseActionId = RenderBaseInputAction(selectedBaseActionId, out currentBaseAction); - if (selectedBaseActionId == selectedRuleActionId) - { - selectedRuleActionId = 0; - } + using (new GUIEnabledWrapper(currentBaseAction != MixedRealityInputAction.None, false)) + { + RenderCriteriaField(currentBaseAction); + + if (selectedBaseActionId == selectedRuleActionId) + { + selectedRuleActionId = 0; + } - selectedRuleActionId = RenderRuleInputAction(selectedRuleActionId, out currentRuleAction); + selectedRuleActionId = RenderRuleInputAction(selectedRuleActionId, out currentRuleAction); - EditorGUILayout.Space(); + EditorGUILayout.Space(); + } - GUI.enabled = isGuiLocked && - !RuleExists() && + bool addButtonEnable = !RuleExists() && currentBaseAction != MixedRealityInputAction.None && currentRuleAction != MixedRealityInputAction.None && currentBaseAction.AxisConstraint != AxisType.None && currentBaseAction.AxisConstraint != AxisType.Raw; - if (RenderIndentedButton(RuleAddButtonContent, EditorStyles.miniButton)) - { - AddRule(); - ResetCriteria(); - } - - GUI.enabled = isGuiLocked; + using (new GUIEnabledWrapper(addButtonEnable, false)) + { + if (MixedRealityEditorUtility.RenderIndentedButton(RuleAddButtonContent, EditorStyles.miniButton)) + { + AddRule(); + ResetCriteria(); + } + } - EditorGUILayout.Space(); + EditorGUILayout.Space(); - var isWideMode = EditorGUIUtility.wideMode; - EditorGUIUtility.wideMode = true; + var isWideMode = EditorGUIUtility.wideMode; + EditorGUIUtility.wideMode = true; - RenderList(inputActionRulesDigital, digitalFoldouts); - RenderList(inputActionRulesSingleAxis, singleAxisFoldouts); - RenderList(inputActionRulesDualAxis, dualAxisFoldouts); - RenderList(inputActionRulesVectorAxis, vectorFoldouts); - RenderList(inputActionRulesQuaternionAxis, quaternionFoldouts); - RenderList(inputActionRulesPoseAxis, poseFoldouts); + RenderList(inputActionRulesDigital, digitalFoldouts); + RenderList(inputActionRulesSingleAxis, singleAxisFoldouts); + RenderList(inputActionRulesDualAxis, dualAxisFoldouts); + RenderList(inputActionRulesVectorAxis, vectorFoldouts); + RenderList(inputActionRulesQuaternionAxis, quaternionFoldouts); + RenderList(inputActionRulesPoseAxis, poseFoldouts); - EditorGUIUtility.wideMode = isWideMode; - serializedObject.ApplyModifiedProperties(); + EditorGUIUtility.wideMode = isWideMode; + serializedObject.ApplyModifiedProperties(); + } + } - GUI.enabled = wasGUIlocked; + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionRulesProfile; } private bool RuleExists() @@ -205,15 +220,12 @@ private void ResetCriteria() private static void GetCompatibleActions(MixedRealityInputAction baseAction) { - ruleActionLabels = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions - .Where(inputAction => inputAction.AxisConstraint == baseAction.AxisConstraint && inputAction.Id != baseAction.Id) - .Select(action => action.Description) - .ToArray(); - - ruleActionIds = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions - .Where(inputAction => inputAction.AxisConstraint == baseAction.AxisConstraint && inputAction.Id != baseAction.Id) - .Select(action => (int)action.Id) - .ToArray(); + var inputActions = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions; + ruleActionLabels = inputActions.Where(inputAction => inputAction.AxisConstraint == baseAction.AxisConstraint && inputAction.Id != baseAction.Id) + .Select(action => action.Description).ToArray(); + + ruleActionIds = inputActions.Where(inputAction => inputAction.AxisConstraint == baseAction.AxisConstraint && inputAction.Id != baseAction.Id) + .Select(action => (int)action.Id).ToArray(); } private void RenderCriteriaField(MixedRealityInputAction action, SerializedProperty criteriaValue = null) @@ -430,35 +442,40 @@ private void AddRule() private int RenderBaseInputAction(int baseActionId, out MixedRealityInputAction action, bool isLocked = false) { - action = MixedRealityInputAction.None; - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.LabelField(BaseActionContent); - EditorGUI.BeginChangeCheck(); - - if (!isLocked) + using (new GUIEnabledWrapper(isInitialized, false)) { - baseActionId = EditorGUILayout.IntPopup(baseActionId, baseActionLabels, baseActionIds, GUILayout.ExpandWidth(true)); - } + action = MixedRealityInputAction.None; + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(BaseActionContent); + EditorGUI.BeginChangeCheck(); - for (int i = 0; i < MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions.Length; i++) - { - if (baseActionId == (int)MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions[i].Id) + if (!isLocked) { - action = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions[i]; + baseActionId = EditorGUILayout.IntPopup(baseActionId, baseActionLabels, baseActionIds, GUILayout.ExpandWidth(true)); } - } - if (action != MixedRealityInputAction.None) - { - GetCompatibleActions(action); - } + var inputActions = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions; + for (int i = 0; i < inputActions.Length; i++) + { + if (baseActionId == (int)inputActions[i].Id) + { + action = inputActions[i]; + } + } - if (isLocked) - { - EditorGUILayout.LabelField(action.Description, EditorStyles.boldLabel, GUILayout.ExpandWidth(true)); + if (action != MixedRealityInputAction.None) + { + GetCompatibleActions(action); + } + + if (isLocked) + { + EditorGUILayout.LabelField(action.Description, EditorStyles.boldLabel, GUILayout.ExpandWidth(true)); + } + + EditorGUILayout.EndHorizontal(); } - EditorGUILayout.EndHorizontal(); return baseActionId; } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs index 88b3adec76a..ce39ee21b33 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs @@ -32,25 +32,24 @@ protected override void OnEnable() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) - { - return; - } + RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); - if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target), false)) { - EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); - return; - } + serializedObject.Update(); - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - serializedObject.Update(); + RenderList(inputActionList); - RenderList(inputActionList); + serializedObject.ApplyModifiedProperties(); + } + } - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile; } private static void RenderList(SerializedProperty list) @@ -58,54 +57,54 @@ private static void RenderList(SerializedProperty list) EditorGUILayout.Space(); GUILayout.BeginVertical(); - if (RenderIndentedButton(AddButtonContent, EditorStyles.miniButton)) - { - list.arraySize += 1; - var inputAction = list.GetArrayElementAtIndex(list.arraySize - 1); - var inputActionId = inputAction.FindPropertyRelative("id"); - var inputActionDescription = inputAction.FindPropertyRelative("description"); - var inputActionConstraint = inputAction.FindPropertyRelative("axisConstraint"); - inputActionConstraint.intValue = 0; - inputActionDescription.stringValue = $"New Action {inputActionId.intValue = list.arraySize}"; - } + if (MixedRealityEditorUtility.RenderIndentedButton(AddButtonContent, EditorStyles.miniButton)) + { + list.arraySize += 1; + var inputAction = list.GetArrayElementAtIndex(list.arraySize - 1); + var inputActionId = inputAction.FindPropertyRelative("id"); + var inputActionDescription = inputAction.FindPropertyRelative("description"); + var inputActionConstraint = inputAction.FindPropertyRelative("axisConstraint"); + inputActionConstraint.intValue = 0; + inputActionDescription.stringValue = $"New Action {inputActionId.intValue = list.arraySize}"; + } - GUILayout.Space(12f); + GUILayout.Space(12f); - GUILayout.BeginVertical(); + GUILayout.BeginVertical(); - GUILayout.BeginHorizontal(); - var labelWidth = EditorGUIUtility.labelWidth; - EditorGUIUtility.labelWidth = 36f; - EditorGUILayout.LabelField(ActionContent, GUILayout.ExpandWidth(true)); - EditorGUILayout.LabelField(AxisConstraintContent, GUILayout.Width(96f)); - EditorGUILayout.LabelField(string.Empty, GUILayout.Width(24f)); - EditorGUIUtility.labelWidth = labelWidth; - GUILayout.EndHorizontal(); + GUILayout.BeginHorizontal(); + var labelWidth = EditorGUIUtility.labelWidth; + EditorGUIUtility.labelWidth = 36f; + EditorGUILayout.LabelField(ActionContent, GUILayout.ExpandWidth(true)); + EditorGUILayout.LabelField(AxisConstraintContent, GUILayout.Width(96f)); + EditorGUILayout.LabelField(string.Empty, GUILayout.Width(24f)); + EditorGUIUtility.labelWidth = labelWidth; + GUILayout.EndHorizontal(); - scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); - for (int i = 0; i < list.arraySize; i++) - { - EditorGUILayout.BeginHorizontal(); - var previousLabelWidth = EditorGUIUtility.labelWidth; - EditorGUIUtility.labelWidth = 64f; - SerializedProperty inputAction = list.GetArrayElementAtIndex(i); - SerializedProperty inputActionDescription = inputAction.FindPropertyRelative("description"); - var inputActionConstraint = inputAction.FindPropertyRelative("axisConstraint"); - EditorGUILayout.PropertyField(inputActionDescription, GUIContent.none); - EditorGUILayout.PropertyField(inputActionConstraint, GUIContent.none, GUILayout.Width(96f)); - EditorGUIUtility.labelWidth = previousLabelWidth; - - if (GUILayout.Button(MinusButtonContent, EditorStyles.miniButtonRight, GUILayout.Width(24f))) + for (int i = 0; i < list.arraySize; i++) { - list.DeleteArrayElementAtIndex(i); + EditorGUILayout.BeginHorizontal(); + var previousLabelWidth = EditorGUIUtility.labelWidth; + EditorGUIUtility.labelWidth = 64f; + SerializedProperty inputAction = list.GetArrayElementAtIndex(i); + SerializedProperty inputActionDescription = inputAction.FindPropertyRelative("description"); + var inputActionConstraint = inputAction.FindPropertyRelative("axisConstraint"); + EditorGUILayout.PropertyField(inputActionDescription, GUIContent.none); + EditorGUILayout.PropertyField(inputActionConstraint, GUIContent.none, GUILayout.Width(96f)); + EditorGUIUtility.labelWidth = previousLabelWidth; + + if (GUILayout.Button(MinusButtonContent, EditorStyles.miniButtonRight, GUILayout.Width(24f))) + { + list.DeleteArrayElementAtIndex(i); + } + + EditorGUILayout.EndHorizontal(); } - EditorGUILayout.EndHorizontal(); - } - - EditorGUILayout.EndScrollView(); - GUILayout.EndVertical(); + EditorGUILayout.EndScrollView(); + GUILayout.EndVertical(); GUILayout.EndVertical(); } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs index f772805a174..231b63b313e 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs @@ -52,11 +52,6 @@ protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) - { - return; - } - dataProviderConfigurations = serializedObject.FindProperty("dataProviderConfigurations"); focusProviderType = serializedObject.FindProperty("focusProviderType"); inputActionsProfile = serializedObject.FindProperty("inputActionsProfile"); @@ -77,107 +72,111 @@ protected override void OnEnable() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, string.Empty)) + RenderProfileHeader(ProfileTitle, string.Empty); + + bool changed = false; + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - return; - } + serializedObject.Update(); - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - serializedObject.Update(); + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(focusProviderType); + EditorGUILayout.Space(); - EditorGUI.BeginChangeCheck(); - bool changed = false; + bool isSubProfile = RenderAsSubProfile; + if (!isSubProfile) + { + EditorGUI.indentLevel++; + } - EditorGUILayout.PropertyField(focusProviderType); - EditorGUILayout.Space(); + RenderFoldout(ref showDataProviders, "Input Data Providers", () => + { + using (new EditorGUI.IndentLevelScope()) + { + RenderList(dataProviderConfigurations); + } + }); - bool isSubProfile = RenderAsSubProfile; - if (!isSubProfile) - { - EditorGUI.indentLevel++; - } + RenderFoldout(ref showPointerProperties, "Pointers", () => + { + using (new EditorGUI.IndentLevelScope()) + { + changed |= RenderProfile(pointerProfile, typeof(MixedRealityPointerProfile), true, false); + } + }); - RenderFoldout(ref showDataProviders, "Input Data Providers", () => - { - using (new EditorGUI.IndentLevelScope()) + RenderFoldout(ref showActionsProperties, "Input Actions", () => { - RenderList(dataProviderConfigurations); - } - }); + using (new EditorGUI.IndentLevelScope()) + { + changed |= RenderProfile(inputActionsProfile, typeof(MixedRealityInputActionsProfile), true, false); + EditorGUILayout.Space(); + EditorGUILayout.Space(); + changed |= RenderProfile(inputActionRulesProfile, typeof(MixedRealityInputActionRulesProfile), true, false); + } + }); - RenderFoldout(ref showPointerProperties, "Pointers", () => - { - using (new EditorGUI.IndentLevelScope()) + RenderFoldout(ref showControllerProperties, "Controllers", () => { - changed |= RenderProfile(pointerProfile, true, false); - } - }); + using (new EditorGUI.IndentLevelScope()) + { + EditorGUILayout.PropertyField(enableControllerMapping); + changed |= RenderProfile(controllerMappingProfile, typeof(MixedRealityControllerMappingProfile), true, false); + EditorGUILayout.Space(); + changed |= RenderProfile(controllerVisualizationProfile, null, true, false, typeof(IMixedRealityControllerVisualizer)); + } + }); - RenderFoldout(ref showActionsProperties, "Input Actions", () => - { - using (new EditorGUI.IndentLevelScope()) + RenderFoldout(ref showGestureProperties, "Gestures", () => { - changed |= RenderProfile(inputActionsProfile, true, false); - EditorGUILayout.Space(); - changed |= RenderProfile(inputActionRulesProfile, true, false); - } - }); + using (new EditorGUI.IndentLevelScope()) + { + changed |= RenderProfile(gesturesProfile, typeof(MixedRealityGesturesProfile), true, false); + } + }); - RenderFoldout(ref showControllerProperties, "Controllers", () => - { - using (new EditorGUI.IndentLevelScope()) + RenderFoldout(ref showSpeechCommandsProperties, "Speech Commands", () => { - EditorGUILayout.PropertyField(enableControllerMapping); - changed |= RenderProfile(controllerMappingProfile, true, false); - EditorGUILayout.Space(); - changed |= RenderProfile(controllerVisualizationProfile, true, false, typeof(IMixedRealityControllerVisualizer)); - } - }); + using (new EditorGUI.IndentLevelScope()) + { + changed |= RenderProfile(speechCommandsProfile, typeof(MixedRealitySpeechCommandsProfile), true, false); + } + }); - RenderFoldout(ref showGestureProperties, "Gestures", () => - { - using (new EditorGUI.IndentLevelScope()) + RenderFoldout(ref showHandTrackingProperties, "Hand Tracking", () => { - changed |= RenderProfile(gesturesProfile, true, false); - } - }); + using (new EditorGUI.IndentLevelScope()) + { + changed |= RenderProfile(handTrackingProfile, typeof(MixedRealityHandTrackingProfile), true, false); + } + }); - RenderFoldout(ref showSpeechCommandsProperties, "Speech Commands", () => - { - using (new EditorGUI.IndentLevelScope()) + if (!isSubProfile) { - changed |= RenderProfile(speechCommandsProfile, true, false); + EditorGUI.indentLevel--; } - }); - RenderFoldout(ref showHandTrackingProperties, "Hand Tracking", () => - { - using (new EditorGUI.IndentLevelScope()) + if (!changed) { - changed |= RenderProfile(handTrackingProfile, true, false); + changed |= EditorGUI.EndChangeCheck(); } - }); - - if (!isSubProfile) - { - EditorGUI.indentLevel--; - } - if (!changed) - { - changed |= EditorGUI.EndChangeCheck(); + serializedObject.ApplyModifiedProperties(); } - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; - if (changed && MixedRealityToolkit.IsInitialized) { EditorApplication.delayCall += () => MixedRealityToolkit.Instance.ResetConfiguration(MixedRealityToolkit.Instance.ActiveProfile); } } + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile; + } + private void RenderList(SerializedProperty list) { EditorGUILayout.Space(); @@ -265,7 +264,7 @@ private void RenderList(SerializedProperty list) serviceType = (target as MixedRealityInputSystemProfile).DataProviderConfigurations[i].ComponentType; } - changed |= RenderProfile(configurationProfile, true, false, serviceType); + changed |= RenderProfile(configurationProfile, null, true, false, serviceType); } serializedObject.ApplyModifiedProperties(); diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs index d38474cb607..0c992f793e5 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs @@ -2,9 +2,9 @@ // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Editor; +using Microsoft.MixedReality.Toolkit.Input.UnityInput; using Microsoft.MixedReality.Toolkit.Utilities.Editor; using UnityEditor; -using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Input { @@ -18,26 +18,27 @@ public class MixedRealityMouseInputProfileInspector : BaseMixedRealityToolkitCon 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)) + RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); + + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target), false)) { - return; + serializedObject.Update(); + EditorGUILayout.PropertyField(mouseSpeed); + serializedObject.ApplyModifiedProperties(); } + } - serializedObject.Update(); - - EditorGUILayout.Space(); - EditorGUILayout.PropertyField(mouseSpeed); - - serializedObject.ApplyModifiedProperties(); - GUI.enabled = true; + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + var mouseManager = MixedRealityToolkit.Instance.GetService(); + return MixedRealityToolkit.IsInitialized && profile != null && + mouseManager != null && profile == mouseManager.MouseInputProfile; } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs index da5fe9695a7..66dfb4b432a 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs @@ -58,64 +58,62 @@ protected override void OnEnable() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) - { - return; - } + RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); - if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled) + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - EditorGUILayout.HelpBox("No input system is enabled, or you need to specify the type in the main configuration profile.", MessageType.Error); - return; - } + serializedObject.Update(); + currentlySelectedPointerOption = -1; - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - - serializedObject.Update(); - currentlySelectedPointerOption = -1; - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Gaze Settings", EditorStyles.boldLabel); - { EditorGUILayout.Space(); - EditorGUILayout.PropertyField(gazeCursorPrefab); - EditorGUILayout.PropertyField(gazeProviderType); - EditorGUILayout.Space(); - - if (RenderIndentedButton("Customize Gaze Provider Settings")) + EditorGUILayout.LabelField("Gaze Settings", EditorStyles.boldLabel); { - Selection.activeObject = CameraCache.Main.gameObject; - } - } + EditorGUILayout.Space(); + EditorGUILayout.PropertyField(gazeCursorPrefab); + EditorGUILayout.PropertyField(gazeProviderType); + EditorGUILayout.Space(); - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Pointer Settings", EditorStyles.boldLabel); - { - EditorGUILayout.PropertyField(pointingExtent); - EditorGUILayout.PropertyField(pointingRaycastLayerMasks, true); - EditorGUILayout.PropertyField(pointerMediator); + if (MixedRealityEditorUtility.RenderIndentedButton("Customize Gaze Provider Settings")) + { + Selection.activeObject = CameraCache.Main.gameObject; + } + } EditorGUILayout.Space(); - showPointerOptionProperties = EditorGUILayout.Foldout(showPointerOptionProperties, "Pointer Options", true); - if (showPointerOptionProperties) + EditorGUILayout.LabelField("Pointer 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) { - pointerOptionList.DoLayoutList(); + using (new EditorGUI.IndentLevelScope()) + { + pointerOptionList.DoLayoutList(); + } } } - } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Debug Settings", EditorStyles.boldLabel); - { - EditorGUILayout.PropertyField(debugDrawPointingRays); - EditorGUILayout.PropertyField(debugDrawPointingRayColors, true); + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Debug Settings", EditorStyles.boldLabel); + { + EditorGUILayout.PropertyField(debugDrawPointingRays); + EditorGUILayout.PropertyField(debugDrawPointingRayColors, true); + } + + serializedObject.ApplyModifiedProperties(); } - - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; + } + + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.PointerProfile; } private void DrawPointerOptionElement(Rect rect, int index, bool isActive, bool isFocused) diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs index bdf6fe6733a..118be9695d3 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs @@ -30,19 +30,24 @@ protected override void OnEnable() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) + RenderProfileHeader(ProfileTitle, ProfileDescription); + + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - return; - } + serializedObject.Update(); - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - serializedObject.Update(); + RenderList(configurations); - RenderList(configurations); + serializedObject.ApplyModifiedProperties(); + } + } - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + + return MixedRealityToolkit.IsInitialized && profile != null && + MixedRealityToolkit.Instance.ActiveProfile.RegisteredServiceProvidersProfile == profile; } private void RenderList(SerializedProperty list) @@ -146,7 +151,7 @@ private void RenderList(SerializedProperty list) serviceType = (target as MixedRealityRegisteredServiceProvidersProfile).Configurations[i].ComponentType; } - changed |= RenderProfile(configurationProfile, true, true, serviceType); + changed |= RenderProfile(configurationProfile, null, true, true, serviceType); EditorGUI.indentLevel--; diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs index 5dc2e434e05..447502af134 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs @@ -6,6 +6,7 @@ using UnityEditor; using UnityEngine; using Microsoft.MixedReality.Toolkit.SpatialAwareness; +using System.Linq; namespace Microsoft.MixedReality.Toolkit.Editor.SpatialAwareness { @@ -63,65 +64,72 @@ protected override void OnEnable() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) + RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.SpatialAwareness); + + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - return; - } + serializedObject.Update(); - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - serializedObject.Update(); + EditorGUILayout.LabelField("General Settings", EditorStyles.boldLabel); + { + 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); + } - EditorGUILayout.LabelField("General Settings", EditorStyles.boldLabel); - { - 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) + EditorGUILayout.LabelField("Physics Settings", EditorStyles.boldLabel); { - message = "Observed meshes will be aligned to the world coordinate space."; + EditorGUILayout.PropertyField(meshPhysicsLayer, physicsLayerContent); + EditorGUILayout.PropertyField(recalculateNormals); } - else if (observerVolumeType.intValue == (int)VolumeType.UserAlignedCube) + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Level of Detail Settings", EditorStyles.boldLabel); { - message = "Observed meshes will be aligned to the user's coordinate space."; + 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); } - else if (observerVolumeType.intValue == (int)VolumeType.Sphere) + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Display Settings", EditorStyles.boldLabel); { - message = "The X value of the Observation Extents will be used as the sphere radius."; + EditorGUILayout.PropertyField(displayOption, displayOptionContent); + EditorGUILayout.PropertyField(visibleMaterial); + EditorGUILayout.PropertyField(occlusionMaterial); } - EditorGUILayout.HelpBox(message, MessageType.Info); - EditorGUILayout.PropertyField(observationExtents); - } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Physics Settings", EditorStyles.boldLabel); - { - EditorGUILayout.PropertyField(meshPhysicsLayer, physicsLayerContent); - EditorGUILayout.PropertyField(recalculateNormals); - } - - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Level of Detail Settings", EditorStyles.boldLabel); - { - 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); + serializedObject.ApplyModifiedProperties(); } + } - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Display Settings", EditorStyles.boldLabel); - { - EditorGUILayout.PropertyField(displayOption, displayOptionContent); - EditorGUILayout.PropertyField(visibleMaterial); - EditorGUILayout.PropertyField(occlusionMaterial); - } + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; + return MixedRealityToolkit.IsInitialized && profile != null && + MixedRealityToolkit.Instance.ActiveProfile.SpatialAwarenessSystemProfile != null && + MixedRealityToolkit.Instance.ActiveProfile.SpatialAwarenessSystemProfile.ObserverConfigurations != null && + MixedRealityToolkit.Instance.ActiveProfile.SpatialAwarenessSystemProfile.ObserverConfigurations.Any(s => s.ObserverProfile == profile); } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs index cfecad72aac..33152a4bf35 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs @@ -39,22 +39,26 @@ protected override void OnEnable() public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription)) + RenderProfileHeader(ProfileTitle, ProfileDescription); + + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - return; - } + serializedObject.Update(); - bool wasGUIEnabled = GUI.enabled; - GUI.enabled = wasGUIEnabled && !IsProfileLock((BaseMixedRealityProfile)target); - serializedObject.Update(); + using (new EditorGUI.IndentLevelScope()) + { + RenderList(observerConfigurations); + } - using (new EditorGUI.IndentLevelScope()) - { - RenderList(observerConfigurations); + serializedObject.ApplyModifiedProperties(); } + } - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.SpatialAwarenessSystemProfile; } private void RenderList(SerializedProperty list) @@ -63,7 +67,7 @@ private void RenderList(SerializedProperty list) using (new EditorGUILayout.VerticalScope()) { - if (RenderIndentedButton(AddObserverContent, EditorStyles.miniButton)) + if (MixedRealityEditorUtility.RenderIndentedButton(AddObserverContent, EditorStyles.miniButton)) { list.InsertArrayElementAtIndex(list.arraySize); SerializedProperty observer = list.GetArrayElementAtIndex(list.arraySize - 1); @@ -137,7 +141,7 @@ private void RenderList(SerializedProperty list) serviceType = (target as MixedRealitySpatialAwarenessSystemProfile).ObserverConfigurations[i].ComponentType; } - changed |= RenderProfile(observerProfile, true, false, serviceType); + changed |= RenderProfile(observerProfile, null, true, false, serviceType); serializedObject.ApplyModifiedProperties(); } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs index 8cb5f9d862c..6d145bba094 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs @@ -27,149 +27,164 @@ public class MixedRealitySpeechCommandsProfileInspector : BaseMixedRealityToolki private static bool showSpeechCommands = true; private SerializedProperty speechCommands; - private static GUIContent[] actionLabels; - private static int[] actionIds; + private static GUIContent[] actionLabels = new GUIContent[0]; + private static int[] actionIds = new int[0]; + private bool isInitialized = false; protected override void OnEnable() { base.OnEnable(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) + isInitialized = false; + + recognizerStartBehaviour = serializedObject.FindProperty("startBehavior"); + recognitionConfidenceLevel = serializedObject.FindProperty("recognitionConfidenceLevel"); + speechCommands = serializedObject.FindProperty("speechCommands"); + + var thisProfile = target as BaseMixedRealityProfile; + + if (!MixedRealityToolkit.IsInitialized || + !MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled || + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null || + thisProfile != MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.SpeechCommandsProfile) { return; } - if (!MixedRealityToolkit.Instance.ActiveProfile.IsInputSystemEnabled || - MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null) { return; } + var inputActions = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions; + actionLabels = inputActions.Select(action => new GUIContent(action.Description)).Prepend(new GUIContent("None")).ToArray(); + actionIds = inputActions.Select(action => (int)action.Id).Prepend(0).ToArray(); - recognizerStartBehaviour = serializedObject.FindProperty("startBehavior"); - recognitionConfidenceLevel = serializedObject.FindProperty("recognitionConfidenceLevel"); - - speechCommands = serializedObject.FindProperty("speechCommands"); - actionLabels = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions.Select(action => new GUIContent(action.Description)).Prepend(new GUIContent("None")).ToArray(); - actionIds = MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions.Select(action => (int)action.Id).Prepend(0).ToArray(); + isInitialized = true; } public override void OnInspectorGUI() { - if (!RenderProfileHeader(ProfileTitle, ProfileDescription, BackProfileType.Input)) - { - return; - } + RenderProfileHeader(ProfileTitle, ProfileDescription, isInitialized, BackProfileType.Input); - 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; - } + RenderMixedRealityInputConfigured(); - if (MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile == null) + if (MixedRealityToolkit.IsInitialized && 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.LabelField("General Settings", EditorStyles.boldLabel); + using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { - EditorGUILayout.PropertyField(recognizerStartBehaviour); - EditorGUILayout.PropertyField(recognitionConfidenceLevel); - } + serializedObject.Update(); - EditorGUILayout.Space(); - showSpeechCommands = EditorGUILayout.Foldout(showSpeechCommands, "Speech Commands", true, MixedRealityStylesUtility.BoldFoldoutStyle); - if (showSpeechCommands) - { - using (new EditorGUI.IndentLevelScope()) + EditorGUILayout.LabelField("General Settings", EditorStyles.boldLabel); { - RenderList(speechCommands); + EditorGUILayout.PropertyField(recognizerStartBehaviour); + EditorGUILayout.PropertyField(recognitionConfidenceLevel); } - } - serializedObject.ApplyModifiedProperties(); - GUI.enabled = wasGUIEnabled; - } - - private static void RenderList(SerializedProperty list) - { - EditorGUILayout.Space(); - GUILayout.BeginVertical(); - - if (RenderIndentedButton(AddButtonContent, EditorStyles.miniButton)) - { - list.arraySize += 1; - var speechCommand = list.GetArrayElementAtIndex(list.arraySize - 1); - var localizationKey = speechCommand.FindPropertyRelative("localizationKey"); - localizationKey.stringValue = string.Empty; - var keyword = speechCommand.FindPropertyRelative("keyword"); - keyword.stringValue = string.Empty; - var keyCode = speechCommand.FindPropertyRelative("keyCode"); - keyCode.intValue = (int)KeyCode.None; - var action = speechCommand.FindPropertyRelative("action"); - var actionId = action.FindPropertyRelative("id"); - actionId.intValue = 0; - } - - GUILayout.Space(12f); + EditorGUILayout.Space(); + showSpeechCommands = EditorGUILayout.Foldout(showSpeechCommands, "Speech Commands", true, MixedRealityStylesUtility.BoldFoldoutStyle); + if (showSpeechCommands) + { + using (new EditorGUI.IndentLevelScope()) + { + RenderList(speechCommands); + } + } - if (list == null || list.arraySize == 0) - { - EditorGUILayout.HelpBox("Create a new Speech Command.", MessageType.Warning); - GUILayout.EndVertical(); - return; + serializedObject.ApplyModifiedProperties(); } + } - GUILayout.BeginVertical(); - - GUILayout.BeginHorizontal(); - var labelWidth = EditorGUIUtility.labelWidth; - EditorGUIUtility.labelWidth = 36f; - EditorGUILayout.LabelField(LocalizationContent, GUILayout.ExpandWidth(true)); - EditorGUILayout.LabelField(KeywordContent, GUILayout.ExpandWidth(true)); - EditorGUILayout.LabelField(KeyCodeContent, GUILayout.Width(64f)); - EditorGUILayout.LabelField(ActionContent, GUILayout.Width(64f)); - EditorGUILayout.LabelField(string.Empty, GUILayout.Width(24f)); - EditorGUIUtility.labelWidth = labelWidth; - GUILayout.EndHorizontal(); + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.SpeechCommandsProfile; + } - for (int i = 0; i < list.arraySize; i++) + private void RenderList(SerializedProperty list) + { + // Disable speech commands if we could not initialize successfully + using (new GUIEnabledWrapper(isInitialized, false)) { - EditorGUILayout.BeginHorizontal(); - SerializedProperty speechCommand = list.GetArrayElementAtIndex(i); - var localizationKey = speechCommand.FindPropertyRelative("localizationKey"); - EditorGUILayout.PropertyField(localizationKey, GUIContent.none, GUILayout.ExpandWidth(true)); - var keyword = speechCommand.FindPropertyRelative("keyword"); - EditorGUILayout.PropertyField(keyword, GUIContent.none, GUILayout.ExpandWidth(true)); - var keyCode = speechCommand.FindPropertyRelative("keyCode"); - EditorGUILayout.PropertyField(keyCode, GUIContent.none, GUILayout.Width(64f)); - var action = speechCommand.FindPropertyRelative("action"); - var actionId = action.FindPropertyRelative("id"); - var actionDescription = action.FindPropertyRelative("description"); - var actionConstraint = action.FindPropertyRelative("axisConstraint"); - - EditorGUI.BeginChangeCheck(); - actionId.intValue = EditorGUILayout.IntPopup(GUIContent.none, actionId.intValue, actionLabels, actionIds, GUILayout.Width(64f)); - - if (EditorGUI.EndChangeCheck()) + EditorGUILayout.Space(); + GUILayout.BeginVertical(); + + if (MixedRealityEditorUtility.RenderIndentedButton(AddButtonContent, EditorStyles.miniButton)) + { + list.arraySize += 1; + var speechCommand = list.GetArrayElementAtIndex(list.arraySize - 1); + var localizationKey = speechCommand.FindPropertyRelative("localizationKey"); + localizationKey.stringValue = string.Empty; + var keyword = speechCommand.FindPropertyRelative("keyword"); + keyword.stringValue = string.Empty; + var keyCode = speechCommand.FindPropertyRelative("keyCode"); + keyCode.intValue = (int)KeyCode.None; + var action = speechCommand.FindPropertyRelative("action"); + var actionId = action.FindPropertyRelative("id"); + actionId.intValue = 0; + } + + GUILayout.Space(12f); + + if (list == null || list.arraySize == 0) { - MixedRealityInputAction inputAction = actionId.intValue == 0 ? MixedRealityInputAction.None : MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions[actionId.intValue - 1]; - actionDescription.stringValue = inputAction.Description; - actionConstraint.enumValueIndex = (int)inputAction.AxisConstraint; + EditorGUILayout.HelpBox("Create a new Speech Command.", MessageType.Warning); + GUILayout.EndVertical(); + return; } - if (GUILayout.Button(MinusButtonContent, EditorStyles.miniButtonRight, GUILayout.Width(24f))) - { - list.DeleteArrayElementAtIndex(i); - } - - EditorGUILayout.EndHorizontal(); + GUILayout.BeginVertical(); + + GUILayout.BeginHorizontal(); + var labelWidth = EditorGUIUtility.labelWidth; + EditorGUIUtility.labelWidth = 36f; + EditorGUILayout.LabelField(LocalizationContent, GUILayout.ExpandWidth(true)); + EditorGUILayout.LabelField(KeywordContent, GUILayout.ExpandWidth(true)); + EditorGUILayout.LabelField(KeyCodeContent, GUILayout.Width(64f)); + EditorGUILayout.LabelField(ActionContent, GUILayout.Width(64f)); + EditorGUILayout.LabelField(string.Empty, GUILayout.Width(24f)); + EditorGUIUtility.labelWidth = labelWidth; + GUILayout.EndHorizontal(); + + for (int i = 0; i < list.arraySize; i++) + { + EditorGUILayout.BeginHorizontal(); + SerializedProperty speechCommand = list.GetArrayElementAtIndex(i); + var localizationKey = speechCommand.FindPropertyRelative("localizationKey"); + EditorGUILayout.PropertyField(localizationKey, GUIContent.none, GUILayout.ExpandWidth(true)); + + var keyword = speechCommand.FindPropertyRelative("keyword"); + EditorGUILayout.PropertyField(keyword, GUIContent.none, GUILayout.ExpandWidth(true)); + + var keyCode = speechCommand.FindPropertyRelative("keyCode"); + EditorGUILayout.PropertyField(keyCode, GUIContent.none, GUILayout.Width(64f)); + + var action = speechCommand.FindPropertyRelative("action"); + var actionId = action.FindPropertyRelative("id"); + var actionDescription = action.FindPropertyRelative("description"); + var actionConstraint = action.FindPropertyRelative("axisConstraint"); + + EditorGUI.BeginChangeCheck(); + actionId.intValue = EditorGUILayout.IntPopup(GUIContent.none, actionId.intValue, actionLabels, actionIds, GUILayout.Width(64f)); + + if (EditorGUI.EndChangeCheck()) + { + MixedRealityInputAction inputAction = actionId.intValue == 0 ? MixedRealityInputAction.None : MixedRealityToolkit.Instance.ActiveProfile.InputSystemProfile.InputActionsProfile.InputActions[actionId.intValue - 1]; + actionDescription.stringValue = inputAction.Description; + actionConstraint.enumValueIndex = (int)inputAction.AxisConstraint; + } + + if (GUILayout.Button(MinusButtonContent, EditorStyles.miniButtonRight, GUILayout.Width(24f))) + { + list.DeleteArrayElementAtIndex(i); + } + + EditorGUILayout.EndHorizontal(); + } + + GUILayout.EndVertical(); + GUILayout.EndVertical(); } - - GUILayout.EndVertical(); - GUILayout.EndVertical(); } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs index bb35493ef97..e1f37d6e395 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs @@ -2,10 +2,12 @@ // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Boundary; +using Microsoft.MixedReality.Toolkit.Diagnostics; using Microsoft.MixedReality.Toolkit.Input; using Microsoft.MixedReality.Toolkit.SpatialAwareness; using Microsoft.MixedReality.Toolkit.Utilities; using Microsoft.MixedReality.Toolkit.Utilities.Editor; +using System; using UnityEditor; using UnityEngine; @@ -17,47 +19,42 @@ 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 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 static bool showEditorSettings = true; 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() { @@ -100,23 +97,75 @@ protected override void OnEnable() // Editor settings useServiceInspectors = serializedObject.FindProperty("useServiceInspectors"); + + if (this.RenderProfileFuncs == null) + { + this.RenderProfileFuncs = new Func[] + { + () => { + EditorGUILayout.PropertyField(enableCameraSystem); + EditorGUILayout.PropertyField(cameraSystemType); + return RenderProfile(cameraProfile, typeof(MixedRealityCameraProfile), true, false); + }, + () => { + EditorGUILayout.PropertyField(enableInputSystem); + EditorGUILayout.PropertyField(inputSystemType); + return RenderProfile(inputSystemProfile, null, 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, null, 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, null, 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, typeof(MixedRealityDiagnosticsProfile)); + }, + () => { + return RenderProfile(registeredServiceProvidersProfile, typeof(MixedRealityRegisteredServiceProvidersProfile), true, false); + }, + () => { + EditorGUILayout.PropertyField(useServiceInspectors); + return false; + }, + }; + } } public override void OnInspectorGUI() { var configurationProfile = (MixedRealityToolkitConfigurationProfile)target; - serializedObject.Update(); - RenderTitleDescriptionAndLogo("Configuration Profile", string.Empty); + RenderMRTKLogo(); if (!MixedRealityToolkit.IsInitialized) { EditorGUILayout.HelpBox("No Mixed Reality Toolkit found in scene.", MessageType.Warning); - if (GUILayout.Button("Click here to add Mixed Reality Toolkit instance to scene")) + if (MixedRealityEditorUtility.RenderIndentedButton("Add Mixed Reality Toolkit instance to scene")) { - MixedRealityInspectorUtility.AddMixedRealityToolkitToScene(); - EditorGUIUtility.PingObject(MixedRealityToolkit.Instance); + MixedRealityInspectorUtility.AddMixedRealityToolkitToScene(configurationProfile); } } @@ -128,7 +177,9 @@ public override void OnInspectorGUI() if (GUILayout.Button("Copy & Customize")) { - CreateCopyProfileValues(); + var originalSelection = Selection.activeObject; + CreateCustomProfile(target as BaseMixedRealityProfile); + Selection.activeObject = originalSelection; } if (MixedRealityToolkit.IsInitialized) @@ -144,181 +195,80 @@ public override void OnInspectorGUI() } 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); - } - } - } - - // Camera Profile configuration - EditorGUILayout.Space(); - showCameraProperties = EditorGUILayout.Foldout(showCameraProperties, "Camera Settings", true); - if (showCameraProperties) - { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(enableCameraSystem); - EditorGUILayout.PropertyField(cameraSystemType); - changed |= RenderProfile(cameraProfile); - } - } - - // 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, true, typeof(IMixedRealityInputSystem)); - } - } - - // 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, true, typeof(IMixedRealityBoundarySystem)); - } - } + EditorGUILayout.PropertyField(targetExperienceScale, TargetScaleContent); - // Teleport System configuration - EditorGUILayout.Space(); - showTeleportProperties = EditorGUILayout.Foldout(showTeleportProperties, "Teleport System Settings", true); - if (showTeleportProperties) + string scaleDescription = GetExperienceDescription(experienceScale); + if (!string.IsNullOrEmpty(scaleDescription)) { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(enableTeleportSystem); - EditorGUILayout.PropertyField(teleportSystemType); - } + EditorGUILayout.HelpBox(scaleDescription, MessageType.Info); + EditorGUILayout.Space(); } - // 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, true, typeof(IMixedRealitySpatialAwarenessSystem)); - } - } + 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()) { - using (new EditorGUI.IndentLevelScope()) - { - changed |= RenderProfile(registeredServiceProvidersProfile); - } - } - - // Editor settings - EditorGUILayout.Space(); - showEditorSettings = EditorGUILayout.Foldout(showEditorSettings, "Editor Settings", true); - if (showEditorSettings) - { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUILayout.PropertyField(useServiceInspectors); - } + changed |= RenderProfileFuncs[SelectedProfileTab](); } + EditorGUILayout.EndVertical(); + EditorGUILayout.EndHorizontal(); if (!changed) { changed |= EditorGUI.EndChangeCheck(); } - EditorGUIUtility.labelWidth = previousLabelWidth; serializedObject.ApplyModifiedProperties(); + GUI.enabled = true; if (changed && MixedRealityToolkit.IsInitialized) { EditorApplication.delayCall += () => MixedRealityToolkit.Instance.ResetConfiguration(configurationProfile); } } + + protected override bool IsProfileInActiveInstance() + { + var profile = target as BaseMixedRealityProfile; + return MixedRealityToolkit.IsInitialized && profile != null && + profile == MixedRealityToolkit.Instance.ActiveProfile; + } + + 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/Utilities/MixedRealityInspectorUtility.cs b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs index 993a4b28bb2..5dd889ede7a 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs @@ -28,9 +28,9 @@ public static bool CheckMixedRealityConfigured(bool renderEditorElements = true, { if (renderEditorElements) { - EditorGUILayout.HelpBox("No Mixed Reality Toolkit found in scene.", MessageType.Error); + EditorGUILayout.HelpBox("This content cannot be viewed without a Mixed Reality Toolkit instance in the scene.", MessageType.Error); - if (showCreateButton && GUILayout.Button("Click here to add Mixed Reality Toolkit instance to scene")) + if (showCreateButton && MixedRealityEditorUtility.RenderIndentedButton("Add Mixed Reality Toolkit instance to scene")) { AddMixedRealityToolkitToScene(); } @@ -57,11 +57,18 @@ public static bool CheckMixedRealityConfigured(bool renderEditorElements = true, /// /// If MRTK is not initialized in scene, adds & initializes instance to current scene /// - public static void AddMixedRealityToolkitToScene() + public static void AddMixedRealityToolkitToScene(MixedRealityToolkitConfigurationProfile configProfile = null) { if (!MixedRealityToolkit.IsInitialized) { - Selection.activeObject = new GameObject("MixedRealityToolkit").AddComponent(); + MixedRealityToolkit newInstance = new GameObject("MixedRealityToolkit").AddComponent(); + MixedRealityToolkit.SetActiveInstance(newInstance); + Selection.activeObject = newInstance; + + if (configProfile != null) + { + newInstance.ActiveProfile = configProfile; + } } } diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/GUIEnabledWrapper.cs b/Assets/MixedRealityToolkit/Utilities/Editor/GUIEnabledWrapper.cs new file mode 100644 index 00000000000..4787287ee1a --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/Editor/GUIEnabledWrapper.cs @@ -0,0 +1,50 @@ +// 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.Editor +{ + /// + /// Similar to the scope classes in Unity (i.e VerticalScope), + /// this class is a helper class designed to manage GUI.enabled over some lifetime + /// Should be utilized with using{} code block + /// + public class GUIEnabledWrapper : IDisposable + { + private bool wasGUIEnabled; + + /// + /// If overwrite is true, then whatever enable value is provided will be set for lifetime of exec action + /// If overwrite is false, then will only enable GUI if already was enabled + /// + /// desired GUI.enabled value + /// control to disregard whether GUI.enabled was already set + public GUIEnabledWrapper(bool enable, bool overwrite = false) + { + this.wasGUIEnabled = GUI.enabled; + if (overwrite) + { + GUI.enabled = enable; + } + else + { + GUI.enabled = enable && wasGUIEnabled; + } + } + + public void Dispose() + { + // Dispose of unmanaged resources. + Dispose(true); + // Suppress finalization. + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + GUI.enabled = wasGUIEnabled; + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/GUIEnabledWrapper.cs.meta b/Assets/MixedRealityToolkit/Utilities/Editor/GUIEnabledWrapper.cs.meta new file mode 100644 index 00000000000..962fe519b0f --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/Editor/GUIEnabledWrapper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3719cf74f97235241b02a408ed8c66f0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityEditorUtility.cs b/Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityEditorUtility.cs new file mode 100644 index 00000000000..b7626c19bbf --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityEditorUtility.cs @@ -0,0 +1,69 @@ +// 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; +using UnityEngine; + +namespace Microsoft.MixedReality.Toolkit.Utilities.Editor +{ + public static class MixedRealityEditorUtility + { + public static readonly Texture2D LogoLightTheme = (Texture2D)AssetDatabase.LoadAssetAtPath(MixedRealityToolkitFiles.MapRelativeFilePath("StandardAssets/Textures/MRTK_Logo_Black.png"), typeof(Texture2D)); + + public static readonly Texture2D LogoDarkTheme = (Texture2D)AssetDatabase.LoadAssetAtPath(MixedRealityToolkitFiles.MapRelativeFilePath("StandardAssets/Textures/MRTK_Logo_White.png"), typeof(Texture2D)); + + private static readonly Texture HelpIcon = EditorGUIUtility.IconContent("_Help").image; + + /// + /// Render the Mixed Reality Toolkit Logo. + /// + public static void RenderMixedRealityToolkitLogo() + { + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + GUILayout.Label(EditorGUIUtility.isProSkin ? LogoDarkTheme : LogoLightTheme, GUILayout.MaxHeight(96f)); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + GUILayout.Space(3f); + } + + /// + /// Helper function to render buttons correctly indented according to EditorGUI.indentLevel since GUILayout component don't respond naturally + /// + /// text to place in button + /// layout options + /// true if button clicked, false if otherwise + public static bool RenderIndentedButton(string buttonText, params GUILayoutOption[] options) + { + 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 + public 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 + public static bool RenderIndentedButton(Func renderButton) + { + bool result = false; + GUILayout.BeginHorizontal(); + GUILayout.Space(EditorGUI.indentLevel * 15); + result = renderButton(); + GUILayout.EndHorizontal(); + return result; + } + } +} diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityEditorUtility.cs.meta b/Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityEditorUtility.cs.meta new file mode 100644 index 00000000000..6d8b40f7f18 --- /dev/null +++ b/Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityEditorUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f0a3a15cc81d21a4b8ae481fab6d9c04 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs b/Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityStylesUtility.cs similarity index 50% rename from Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs rename to Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityStylesUtility.cs index 0db8d46cdaf..082c62b36c9 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs +++ b/Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityStylesUtility.cs @@ -6,12 +6,22 @@ namespace Microsoft.MixedReality.Toolkit.Editor { - public class MixedRealityStylesUtility + public static class MixedRealityStylesUtility { public static readonly GUIStyle BoldFoldoutStyle = new GUIStyle(EditorStyles.foldout) { fontStyle = FontStyle.Bold }; + + public static readonly GUIStyle ControllerButtonStyle = new GUIStyle("LargeButton") + { + imagePosition = ImagePosition.ImageAbove, + fontStyle = FontStyle.Bold, + stretchHeight = true, + stretchWidth = true, + wordWrap = true, + fontSize = 10, + }; } } \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs.meta b/Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityStylesUtility.cs.meta similarity index 83% rename from Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs.meta rename to Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityStylesUtility.cs.meta index a3cbe0dfd80..4a9815daf58 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityStylesUtility.cs.meta +++ b/Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityStylesUtility.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f369071b10b1ac54aa21a1b5e5127c44 +guid: 5cccd45d484d4804fa4bb6a9a1bb8830 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityEditorSettings.cs b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityEditorSettings.cs index d007fa103cc..36f755248d3 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.GetDirectories(MixedRealityToolkitModuleType.Core).Count() > 1) + if (MixedRealityToolkitFiles.MRTKDirectories.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.GetDirectories(MixedRealityToolkitModuleType.Core).First(); + return MixedRealityToolkitFiles.MRTKDirectories.First(); } Debug.LogError("Unable to find the Mixed Reality Toolkit's directory!"); diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeUtils.cs b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeUtils.cs index e7545def972..e383664c6a3 100644 --- a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeUtils.cs +++ b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeUtils.cs @@ -8,7 +8,7 @@ namespace Microsoft.MixedReality.Toolkit.Utilities.Editor { - public class MixedRealityOptimizeUtils + public static class MixedRealityOptimizeUtils { public static void SetDepthBufferSharing(bool enableDepthBuffer) { diff --git a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeWindow.cs b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeWindow.cs index c91fbc455f0..a7e4dae2d31 100644 --- a/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeWindow.cs +++ b/Assets/MixedRealityToolkit/Utilities/Editor/Setup/MixedRealityOptimizeWindow.cs @@ -4,7 +4,6 @@ using Microsoft.MixedReality.Toolkit.Utilities.Editor; using System; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using UnityEditor; using UnityEngine; @@ -84,12 +83,6 @@ protected enum PerformanceTarget [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; @@ -105,18 +98,6 @@ public static void OpenWindow() 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() @@ -131,15 +112,10 @@ 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(); + MixedRealityEditorUtility.RenderMixedRealityToolkitLogo(); - // Render Title - EditorGUILayout.LabelField("Mixed Reality Toolkit Optimize Window", BoldLargeTitle); + // 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(); @@ -184,7 +160,7 @@ private void RenderShaderOptimizations() 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))) + if (MixedRealityEditorUtility.RenderIndentedButton(new GUIContent("Use MRTK Standard Shader", "Set Replacement Shader to MRKT Standard Shader"), EditorStyles.miniButton, GUILayout.Width(200f))) { FindShaders(); } @@ -276,7 +252,7 @@ private void RenderSceneOptimizations() disableBakedGlobalIllumination = EditorGUILayout.ToggleLeft("Disable Baked Global Illumination", disableBakedGlobalIllumination); } - if (GUILayout.Button("Optimize Lighting")) + if (MixedRealityEditorUtility.RenderIndentedButton("Optimize Lighting")) { OptimizeScene(); } @@ -398,7 +374,7 @@ private void RenderProjectOptimizations() */ }); - if (GUILayout.Button("Optimize Project")) + if (MixedRealityEditorUtility.RenderIndentedButton("Optimize Project")) { OptimizeProject(); } From 6330e443a32562df4bcfcf5f827a58eb0eecfdd7 Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Tue, 21 May 2019 13:15:52 -0700 Subject: [PATCH 44/96] Made it possible to create new MRTK instance without losing focus --- ...dRealityInputSimulationProfileInspector.cs | 2 +- .../MixedRealityToolkitInspector.cs | 18 +------ ...ityToolkitConfigurationProfileInspector.cs | 48 +++++++++++++++---- ...tyBoundaryVisualizationProfileInspector.cs | 2 +- .../MixedRealityCameraProfileInspector.cs | 2 +- ...ealityControllerMappingProfileInspector.cs | 2 +- ...ControllerVisualizationProfileInspector.cs | 2 +- ...ealityDiagnosticsSystemProfileInspector.cs | 2 +- ...MixedRealityEyeTrackingProfileInspector.cs | 2 +- .../MixedRealityGesturesProfileInspector.cs | 4 +- ...ixedRealityHandTrackingProfileInspector.cs | 2 +- .../MixedRealityInputActionRulesInspector.cs | 6 +-- ...ixedRealityInputActionsProfileInspector.cs | 2 +- ...MixedRealityInputSystemProfileInspector.cs | 2 +- .../MixedRealityMouseInputProfileInspector.cs | 2 +- .../MixedRealityPointerProfileInspector.cs | 2 +- ...gisteredServiceProviderProfileInspector.cs | 2 +- ...alAwarenessMeshObserverProfileInspector.cs | 2 +- ...ySpatialAwarenessSystemProfileInspector.cs | 2 +- ...edRealitySpeechCommandsProfileInspector.cs | 2 +- .../Utilities/MixedRealityInspectorUtility.cs | 45 +++++++++++------ 21 files changed, 91 insertions(+), 62 deletions(-) diff --git a/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs b/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs index 03eb7596013..d5c960a2b6a 100644 --- a/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs +++ b/Assets/MixedRealityToolkit.Services/InputSimulation/Editor/MixedRealityInputSimulationProfileInspector.cs @@ -117,7 +117,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); + RenderProfileHeader(ProfileTitle, ProfileDescription, target, true, BackProfileType.Input); serializedObject.Update(); diff --git a/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.cs b/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.cs index 05d31117f6e..b775243d28c 100644 --- a/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/MixedRealityToolkitInspector.cs @@ -61,7 +61,7 @@ public override void OnInspectorGUI() currentPickerWindow = GUIUtility.GetControlID(FocusType.Passive); // Shows the list of MixedRealityToolkitConfigurationProfiles in our project, // selecting the default profile by default (if it exists). - EditorGUIUtility.ShowObjectPicker(GetDefaultProfile(allConfigProfiles), false, string.Empty, currentPickerWindow); + EditorGUIUtility.ShowObjectPicker(MixedRealityInspectorUtility.GetDefaultConfigProfile(allConfigProfiles), false, string.Empty, currentPickerWindow); } else if (allConfigProfiles.Length == 1) { @@ -124,21 +124,5 @@ public static void CreateMixedRealityToolkitGameObject() MixedRealityInspectorUtility.AddMixedRealityToolkitToScene(); EditorGUIUtility.PingObject(MixedRealityToolkit.Instance); } - - /// - /// Given a list of MixedRealityToolkitConfigurationProfile objects, returns - /// the one that matches the default profile name. - /// - private MixedRealityToolkitConfigurationProfile GetDefaultProfile(MixedRealityToolkitConfigurationProfile[] allProfiles) - { - for (int i = 0; i < allProfiles.Length; i++) - { - if (allProfiles[i].name == "DefaultMixedRealityToolkitConfigurationProfile") - { - return allProfiles[i]; - } - } - return null; - } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs index 430dd478db1..c2f1856534c 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs @@ -17,7 +17,10 @@ public abstract class BaseMixedRealityToolkitConfigurationProfileInspector : Bas private static GUIContent WarningIconContent = null; /// - /// Helper function to determine if the current profile is assigned to the active instance of MRTK + /// Helper function to determine if the current profile is assigned to the active instance of MRTK. + /// In some cases profile data refers to other profile data in the MRTK config profile. + /// In these cases, we don't want to render when the active instance isn't using this profile, + /// because it may produce an inaccurate combination of settings. /// /// protected abstract bool IsProfileInActiveInstance(); @@ -122,19 +125,38 @@ protected bool DrawBacktrackProfileButton(string message, UnityEngine.Object act /// /// Title of profile /// profile tooltip describing purpose + /// The profile object. Used to re-select the object after MRTK instance is created. /// profile properties are full initialized for rendering /// Text for back button if not rendering as sub-profile /// Target profile to return to if not rendering as sub-profile - protected void RenderProfileHeader(string title, string description, bool isProfileInitialized = true, BackProfileType returnProfileTarget = BackProfileType.Configuration) + protected void RenderProfileHeader(string title, string description, Object selectionObject, bool isProfileInitialized = true, BackProfileType returnProfileTarget = BackProfileType.Configuration) { RenderMRTKLogo(); var profile = target as BaseMixedRealityProfile; - if (!RenderAsSubProfile && !profile.IsCustomProfile) + if (!RenderAsSubProfile) { - EditorGUILayout.HelpBox("Default Mixed Reality Toolkit profiles cannot be edited", MessageType.Warning); - // TODO: Place clone button. MixedRealityProfileCloneWindow requires parent profile though which is not known here - //EditorGUILayout.HelpBox("Default MRTK profiles cannot be edited. Create a clone of this profile to modify settings.", MessageType.Warning); + if (!profile.IsCustomProfile) + { + EditorGUILayout.HelpBox("Default Mixed Reality Toolkit profiles cannot be edited", MessageType.Warning); + // TODO: Place clone button. MixedRealityProfileCloneWindow requires parent profile though which is not known here + //EditorGUILayout.HelpBox("Default MRTK profiles cannot be edited. Create a clone of this profile to modify settings.", MessageType.Warning); + } + + if (!isProfileInitialized) + { + EditorGUILayout.HelpBox("This profile is not assigned to an active MRTK instance in any of your scenes. Some properties may not be visible", MessageType.Error); + + if (!MixedRealityToolkit.IsInitialized) + { + if (MixedRealityEditorUtility.RenderIndentedButton("Add Mixed Reality Toolkit instance to scene")) + { + MixedRealityInspectorUtility.AddMixedRealityToolkitToScene(MixedRealityInspectorUtility.GetDefaultConfigProfile()); + // After the toolkit has been created, set the selection back to this item so the user doesn't get lost + Selection.activeObject = selectionObject; + } + } + } } else { @@ -143,8 +165,6 @@ protected void RenderProfileHeader(string title, string description, bool isProf EditorGUILayout.HelpBox("Some properties may not be editable in this profile. Please refer to the error messages below to resolve editing.", MessageType.Warning); } - MixedRealityInspectorUtility.CheckMixedRealityConfigured(false, false); - if (MixedRealityToolkit.IsInitialized) { if (IsProfileInActiveInstance()) @@ -153,7 +173,17 @@ protected void RenderProfileHeader(string title, string description, bool isProf } else if (!isProfileInitialized) { - EditorGUILayout.HelpBox("This profile is not assigned to the active MRTK instance in this scene. Some properties may not be editable", MessageType.Error); + EditorGUILayout.HelpBox("This profile is not assigned to an active MRTK instance in any of your scenes. Some properties may not be editable", MessageType.Error); + + if (!MixedRealityToolkit.IsInitialized) + { + if (MixedRealityEditorUtility.RenderIndentedButton("Add Mixed Reality Toolkit instance to scene")) + { + MixedRealityInspectorUtility.AddMixedRealityToolkitToScene(MixedRealityInspectorUtility.GetDefaultConfigProfile()); + // After the toolkit has been created, set the selection back to this item so the user doesn't get lost + Selection.activeObject = selectionObject; + } + } } } } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs index ce6dcd4e46b..9a57e7ec1ed 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs @@ -72,7 +72,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription); + RenderProfileHeader(ProfileTitle, ProfileDescription, target); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs index ef3a5422ed7..7a1eb8df71f 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityCameraProfileInspector.cs @@ -43,7 +43,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription); + RenderProfileHeader(ProfileTitle, ProfileDescription, target); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs index 4f2ec726850..7263e316b31 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs @@ -56,7 +56,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); + RenderProfileHeader(ProfileTitle, ProfileDescription, target, true, BackProfileType.Input); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target), false)) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs index d3a2cc8a587..0bd3545e4d8 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs @@ -64,7 +64,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); + RenderProfileHeader(ProfileTitle, ProfileDescription, target, true, BackProfileType.Input); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs index 830c3678856..bc0d16dbd30 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityDiagnosticsSystemProfileInspector.cs @@ -41,7 +41,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription); + RenderProfileHeader(ProfileTitle, ProfileDescription, target); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs index 9f0ac28a03e..f856a3f876d 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityEyeTrackingProfileInspector.cs @@ -24,7 +24,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, string.Empty, true, BackProfileType.Input); + RenderProfileHeader(ProfileTitle, string.Empty, target, true, BackProfileType.Input); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs index ac99ea5d3c0..ac9c79524c1 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityGesturesProfileInspector.cs @@ -99,11 +99,11 @@ private void UpdateGestureLabels() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription, isInitialized, BackProfileType.Input); + RenderProfileHeader(ProfileTitle, ProfileDescription, target, isInitialized, BackProfileType.Input); RenderMixedRealityInputConfigured(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(true, true)) + if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) { return; } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs index 6d2665ca79c..8e6738bf12d 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityHandTrackingProfileInspector.cs @@ -35,7 +35,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); + RenderProfileHeader(ProfileTitle, ProfileDescription, target, true, BackProfileType.Input); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs index e5b327027ef..587f8bfbb89 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionRulesInspector.cs @@ -76,7 +76,7 @@ protected override void OnEnable() thisProfile = target as MixedRealityInputActionRulesProfile; - // Only reset if we have not yet + // Only reset if we haven't get done so if (digitalFoldouts == null) { ResetCriteria(); @@ -102,11 +102,11 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription, isInitialized, BackProfileType.Input); + RenderProfileHeader(ProfileTitle, ProfileDescription, target, isInitialized, BackProfileType.Input); RenderMixedRealityInputConfigured(); - if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(true, true)) + if (!MixedRealityInspectorUtility.CheckMixedRealityConfigured(false)) { return; } diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs index ce39ee21b33..c99240d76a0 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputActionsProfileInspector.cs @@ -32,7 +32,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); + RenderProfileHeader(ProfileTitle, ProfileDescription, target, true, BackProfileType.Input); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target), false)) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs index 231b63b313e..da6c946f873 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityInputSystemProfileInspector.cs @@ -72,7 +72,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, string.Empty); + RenderProfileHeader(ProfileTitle, string.Empty, target); bool changed = false; using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs index 0c992f793e5..3876cc9af73 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityMouseInputProfileInspector.cs @@ -23,7 +23,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); + RenderProfileHeader(ProfileTitle, ProfileDescription, target, true, BackProfileType.Input); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target), false)) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs index 66dfb4b432a..7cd01bedb97 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs @@ -58,7 +58,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.Input); + RenderProfileHeader(ProfileTitle, ProfileDescription, target, true, BackProfileType.Input); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs index 118be9695d3..ee4368b3608 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityRegisteredServiceProviderProfileInspector.cs @@ -30,7 +30,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription); + RenderProfileHeader(ProfileTitle, ProfileDescription, target); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs index 447502af134..2e296894b4d 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessMeshObserverProfileInspector.cs @@ -64,7 +64,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription, true, BackProfileType.SpatialAwareness); + RenderProfileHeader(ProfileTitle, ProfileDescription, target, true, BackProfileType.SpatialAwareness); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs index 33152a4bf35..f6c9b892442 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpatialAwarenessSystemProfileInspector.cs @@ -39,7 +39,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription); + RenderProfileHeader(ProfileTitle, ProfileDescription, target); using (new GUIEnabledWrapper(!IsProfileLock((BaseMixedRealityProfile)target))) { diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs index 6d145bba094..5047b8ac76c 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealitySpeechCommandsProfileInspector.cs @@ -60,7 +60,7 @@ protected override void OnEnable() public override void OnInspectorGUI() { - RenderProfileHeader(ProfileTitle, ProfileDescription, isInitialized, BackProfileType.Input); + RenderProfileHeader(ProfileTitle, ProfileDescription, target, isInitialized, BackProfileType.Input); RenderMixedRealityInputConfigured(); diff --git a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs index 5dd889ede7a..2adb7e2b8bd 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.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.Editor; using System; using System.Collections.Generic; using System.Linq; @@ -17,27 +18,16 @@ namespace Microsoft.MixedReality.Toolkit.Utilities.Editor public static class MixedRealityInspectorUtility { public const float DottedLineScreenSpace = 4.65f; + public const string DefaultConfigProfileName = "DefaultMixedRealityToolkitConfigurationProfile"; /// /// 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 renderEditorElements = true, bool showCreateButton = false) + public static bool CheckMixedRealityConfigured(bool renderEditorElements = false) { if (!MixedRealityToolkit.IsInitialized) - { - if (renderEditorElements) - { - EditorGUILayout.HelpBox("This content cannot be viewed without a Mixed Reality Toolkit instance in the scene.", MessageType.Error); - - if (showCreateButton && MixedRealityEditorUtility.RenderIndentedButton("Add Mixed Reality Toolkit instance to scene")) - { - AddMixedRealityToolkitToScene(); - } - EditorGUILayout.Space(); - } - - // Don't proceeed + { // Don't proceeed return false; } @@ -47,7 +37,6 @@ public static bool CheckMixedRealityConfigured(bool renderEditorElements = true, { EditorGUILayout.HelpBox("No Active Profile set on the Mixed Reality Toolkit.", MessageType.Error); } - return false; } @@ -197,6 +186,32 @@ public static float AxisMoveHandle(Object target, Vector3 origin, Vector3 direct return distance; } + /// + /// Returns the default config profile, if it exists. + /// + /// + public static MixedRealityToolkitConfigurationProfile GetDefaultConfigProfile() + { + var allConfigProfiles = ScriptableObjectExtensions.GetAllInstances(); + return GetDefaultConfigProfile(allConfigProfiles); + } + + /// + /// Given a list of MixedRealityToolkitConfigurationProfile objects, returns + /// the one that matches the default profile name. + /// + public static MixedRealityToolkitConfigurationProfile GetDefaultConfigProfile(MixedRealityToolkitConfigurationProfile[] allProfiles) + { + for (int i = 0; i < allProfiles.Length; i++) + { + if (allProfiles[i].name == DefaultConfigProfileName) + { + return allProfiles[i]; + } + } + return null; + } + /// /// Draw a Circle Move Handle. /// From 4ad2b9a97ab9d773f2b51b2a3c34d781cc649e9d Mon Sep 17 00:00:00 2001 From: Will Wei Date: Tue, 21 May 2019 09:57:31 -0700 Subject: [PATCH 45/96] Add a fix for issue #4405 in response to CR feedback. --- .../GazePointerVisibilityStateMachine.cs | 6 +- .../GazePointerStateMachineTests.cs | 88 +++++++++---------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs b/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs index 86c60e6a869..0242c035c43 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs @@ -74,11 +74,11 @@ private void UpdateStateEyeGaze(int numNearPointersActive, int numFarPointersAct private void UpdateStateHeadGaze(int numNearPointersActive, int numFarPointersActive) { - bool isMotionControllerOrHandUp = numFarPointersActive > 0 || numNearPointersActive > 0; + bool canGazeCursorShow = numFarPointersActive == 1 && numNearPointersActive == 0; switch (gazePointerState) { case GazePointerState.Initial: - if (isMotionControllerOrHandUp) + 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 @@ -87,7 +87,7 @@ private void UpdateStateHeadGaze(int numNearPointersActive, int numFarPointersAc } break; case GazePointerState.GazePointerActive: - if (isMotionControllerOrHandUp) + if (!canGazeCursorShow) { activateGazeKeywordIsSet = false; gazePointerState = GazePointerState.GazePointerInactive; diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs index ad9340d26f3..8cb169d48ce 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs @@ -16,34 +16,41 @@ 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, "Gaze pointer should be visible on start"); + 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*/, 0 /*numFarPointersActive*/, false); - Assert.IsFalse(gsm.IsGazePointerActive, "After hand is raised, gaze pointer should go away"); + 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 - 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); - Assert.IsFalse(gsm.IsGazePointerActive, "After select is called but hands are up, gaze pointer should not show 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*/, 0 /*numFarPointersActive*/, false); - gsm.OnSpeechKeywordRecognized(data); - gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); - Assert.IsTrue(gsm.IsGazePointerActive, "When no hands present and select called, gaze pointer should 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 - gsm.OnSpeechKeywordRecognized(data); - gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); - gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); - Assert.IsFalse(gsm.IsGazePointerActive, "After select called with hands present, then hand up, 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] @@ -53,29 +60,23 @@ public void TestEyeGazeHandAndSpeechBehaviour() // Initial state: gaze pointer active var gsm = new GazePointerVisibilityStateMachine(); - Assert.IsTrue(gsm.IsGazePointerActive, "Gaze pointer should be visible on start"); + 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, gaze pointer should continue to exist"); + 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, gaze pointer should go away"); + 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, "Gaze pointer should be visible when no near or far pointers"); + 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. - 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); + 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 @@ -104,13 +105,7 @@ public void TestEyeGazeToHeadGazeTransition() // 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. - 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); + 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. @@ -122,13 +117,7 @@ public void TestEyeGazeToHeadGazeTransition() Assert.IsFalse(gsm.IsGazePointerActive, "Gaze pointer should be inactive"); // Saying select at this point should now show the eye gaze pointer. - 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); + FireSelectKeyword(gsm); gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, false); Assert.IsTrue(gsm.IsGazePointerActive, "Gaze pointer should be active"); } @@ -151,5 +140,16 @@ public void TestHeadGazeToEyeGazeTransition() 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); + } } } From 21210d3367bcff7146318c6000cad6c848cefb6d Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Tue, 21 May 2019 13:33:46 -0700 Subject: [PATCH 46/96] Updated clone window to support cloning without parent profile --- ...ityToolkitConfigurationProfileInspector.cs | 12 ++++--- .../MixedRealityProfileCloneWindow.cs | 32 +++++++++++++++---- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs index c2f1856534c..ef1f87df341 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs @@ -138,9 +138,11 @@ protected void RenderProfileHeader(string title, string description, Object sele { if (!profile.IsCustomProfile) { - EditorGUILayout.HelpBox("Default Mixed Reality Toolkit profiles cannot be edited", MessageType.Warning); - // TODO: Place clone button. MixedRealityProfileCloneWindow requires parent profile though which is not known here - //EditorGUILayout.HelpBox("Default MRTK profiles cannot be edited. Create a clone of this profile to modify settings.", MessageType.Warning); + EditorGUILayout.HelpBox("Default MRTK profiles cannot be edited. Create a clone of this profile to modify settings.", MessageType.Warning); + if (MixedRealityEditorUtility.RenderIndentedButton(new GUIContent("Clone"), EditorStyles.miniButton)) + { + MixedRealityProfileCloneWindow.OpenWindow(null, (BaseMixedRealityProfile)target, null); + } } if (!isProfileInitialized) @@ -149,7 +151,7 @@ protected void RenderProfileHeader(string title, string description, Object sele if (!MixedRealityToolkit.IsInitialized) { - if (MixedRealityEditorUtility.RenderIndentedButton("Add Mixed Reality Toolkit instance to scene")) + if (MixedRealityEditorUtility.RenderIndentedButton(new GUIContent("Add Mixed Reality Toolkit instance to scene"), EditorStyles.miniButton)) { MixedRealityInspectorUtility.AddMixedRealityToolkitToScene(MixedRealityInspectorUtility.GetDefaultConfigProfile()); // After the toolkit has been created, set the selection back to this item so the user doesn't get lost @@ -177,7 +179,7 @@ protected void RenderProfileHeader(string title, string description, Object sele if (!MixedRealityToolkit.IsInitialized) { - if (MixedRealityEditorUtility.RenderIndentedButton("Add Mixed Reality Toolkit instance to scene")) + if (MixedRealityEditorUtility.RenderIndentedButton(new GUIContent("Add Mixed Reality Toolkit instance to scene"), EditorStyles.miniButton)) { MixedRealityInspectorUtility.AddMixedRealityToolkitToScene(MixedRealityInspectorUtility.GetDefaultConfigProfile()); // After the toolkit has been created, set the selection back to this item so the user doesn't get lost diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityProfileCloneWindow.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityProfileCloneWindow.cs index f5806084eea..a0a66f9ea17 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityProfileCloneWindow.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/MixedRealityProfileCloneWindow.cs @@ -70,8 +70,8 @@ private void Initialize(BaseMixedRealityProfile parentProfile, BaseMixedRealityP this.parentProfile = parentProfile; this.childProfile = childProfile; - childSerializedObject = new SerializedObject(childProperty.objectReferenceValue); - childProfileTypeName = childProperty.objectReferenceValue.GetType().Name; + childSerializedObject = new SerializedObject(childProfile); + childProfileTypeName = childProfile.GetType().Name; childProfileAssetName = "New " + childProfileTypeName; // Find all the serialized properties for sub-profiles @@ -120,11 +120,13 @@ private void Initialize(BaseMixedRealityProfile parentProfile, BaseMixedRealityP { cloneWindow.maxSize = minWindowSize; } + + targetFolder = EnsureTargetFolder(targetFolder); } private void OnGUI() { - if (cloneWindow == null || parentProfile == null || childProfile == null) + if (cloneWindow == null || childProfile == null) { Close(); return; @@ -132,7 +134,10 @@ private void OnGUI() EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.ObjectField("Cloning profile", childProfile, typeof(BaseMixedRealityProfile), false); - EditorGUILayout.ObjectField("from parent profile", parentProfile, typeof(BaseMixedRealityProfile), false); + if (parentProfile != null) + { // Only show this if we're initiating this from a parent profile + EditorGUILayout.ObjectField("from parent profile", parentProfile, typeof(BaseMixedRealityProfile), false); + } EditorGUILayout.EndVertical(); EditorGUILayout.Space(); @@ -265,6 +270,12 @@ private void CloneMainProfile() newChildSerializedObject.ApplyModifiedProperties(); + // If we're not working with a parent profile, select the newly created profile + if (parentProfile == null) + { + Selection.activeObject = newChildProfile; + } + cloneWindow.Close(); } @@ -278,15 +289,22 @@ private static BaseMixedRealityProfile CloneProfile(BaseMixedRealityProfile pare Debug.Log("Creating asset in path " + targetFolder); var newChildProfile = instance.CreateAsset(path, fileName) as BaseMixedRealityProfile; - childProperty.objectReferenceValue = newChildProfile; - childProperty.serializedObject.ApplyModifiedProperties(); + + if (childProperty != null) + { + childProperty.objectReferenceValue = newChildProfile; + childProperty.serializedObject.ApplyModifiedProperties(); + } return newChildProfile; } private static void PasteProfileValues(BaseMixedRealityProfile parentProfile, BaseMixedRealityProfile profileToCopy, SerializedObject targetProfile) { - Undo.RecordObject(parentProfile, "Paste Profile Values"); + if (parentProfile != null) + { + Undo.RecordObject(parentProfile, "Paste Profile Values"); + } bool targetIsCustom = targetProfile.FindProperty(IsCustomProfileProperty).boolValue; string originalName = targetProfile.targetObject.name; From 4bf5017055c5d713d11438c022a36a28f9901ff2 Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Tue, 21 May 2019 13:36:03 -0700 Subject: [PATCH 47/96] Update BaseMixedRealityProfileInspector.cs --- .../Inspectors/Profiles/BaseMixedRealityProfileInspector.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs index 8172f4174f2..838c681ce86 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityProfileInspector.cs @@ -96,7 +96,8 @@ private static bool RenderProfileInternal(SerializedProperty property, Type prof var oldObject = property.objectReferenceValue; if (profileType != null && !profileType.IsSubclassOf(typeof(BaseMixedRealityProfile)) && profileType != typeof(BaseMixedRealityProfile)) - { + { + // If they've drag-and-dropped a non-profile scriptable object, set it to null. profileType = null; } From 1e6bbf1f20b90a73b476196168f7de517fba0991 Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Tue, 21 May 2019 13:42:32 -0700 Subject: [PATCH 48/96] Update MixedRealityInspectorUtility.cs --- .../Inspectors/Utilities/MixedRealityInspectorUtility.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs index 2adb7e2b8bd..ff923ef9634 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Utilities/MixedRealityInspectorUtility.cs @@ -44,7 +44,7 @@ public static bool CheckMixedRealityConfigured(bool renderEditorElements = false } /// - /// If MRTK is not initialized in scene, adds & initializes instance to current scene + /// If MRTK is not initialized in scene, adds and initializes instance to current scene /// public static void AddMixedRealityToolkitToScene(MixedRealityToolkitConfigurationProfile configProfile = null) { From d32e54211362d0274a1b3d3fef043bd678e7e6f5 Mon Sep 17 00:00:00 2001 From: Will Wei Date: Tue, 21 May 2019 14:02:47 -0700 Subject: [PATCH 49/96] Enable .NET scripting backend support in CI, part 2/2 https://github.com/microsoft/MixedRealityToolkit-Unity/issues/3656 The folder destination of the appx package and its naming are also different when building C# projects, so instead of being in the build/AppPackages/MixedRealityToolkit folder, it's actually in the build/MixedRealityToolkit/AppPackages. And instead of the name MixedRealityToolkit_2.0.0.0_Win32_Master_Test, it's MixedRealityToolkit_2.0.0.0_x86_Master_Test. This will need to be a followup YAML pipeline switch on scripting backend. Note that this change makes it run in CI and PR, which will increase times. Depending on duration we might look to split this step out into its own check (so that we can parallelize across machines). Note that simply replacing one of the other ones I'm not certain will work, because we depend on those existing pipelines to generate assemblies which get bundled into the final NuGet package. --- pipelines/templates/common.yml | 8 ++++++++ pipelines/templates/tasks/unitybuild.yml | 15 ++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pipelines/templates/common.yml b/pipelines/templates/common.yml index dbf8901a469..a7dc3f2748f 100644 --- a/pipelines/templates/common.yml +++ b/pipelines/templates/common.yml @@ -17,6 +17,14 @@ steps: PublishArtifacts: true PackagingDir: 'ARM' +# Build UWP x86 .NET backend +- template: tasks/unitybuild.yml + parameters: + Arch: 'x86' + Platform: 'UWP' + PublishArtifacts: true + ScriptingBackend: '.NET' + - powershell: | $AutoMrtkVersion = Get-Date -format "dd.MM.yyyy" .\build.ps1 -Version $AutoMrtkVersion -NoNuget diff --git a/pipelines/templates/tasks/unitybuild.yml b/pipelines/templates/tasks/unitybuild.yml index 9f076fcf216..4d4a5e76ecb 100644 --- a/pipelines/templates/tasks/unitybuild.yml +++ b/pipelines/templates/tasks/unitybuild.yml @@ -13,8 +13,10 @@ steps: # 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 + # The build output goes to a unique combination of Platform + Arch + ScriptingBackend to ensure that + # each build will have a fresh destination folder. + $outDir = "$(Build.ArtifactStagingDirectory)\build\${{ parameters.Platform }}_${{ parameters.Arch }}_${{ parameters.ScriptingBackend }}" + $logFile = New-Item -Path "$outDir\build\build.log" -ItemType File -Force $sceneList = "Assets\MixedRealityToolkit.Examples\Demos\HandTracking\Scenes\HandInteractionExamples.unity" @@ -58,5 +60,12 @@ steps: - 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' + # The final location of the generated package depends on the type of scripting backend it's built against. + # For the default scripting backend (IL2CPP) the naming of the appx follows the form below: + - ${{ if eq(parameters.ScriptingBackend, 'default' }}: + PathtoPublish: '$outDir\AppPackages\MixedRealityToolkit\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.PackagingDir }}_Master_Test' + # For .NET scripting backends, the naming is slightly different (mainly the AppPackages and MixedRealityToolkit folder + # names are reversed, and the Architecture is part of the AppX name) + - ${{ if eq(parameters.ScriptingBackend, '.NET' }}: + PathtoPublish: '$outDir\MixedRealityToolkit\AppPackages\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.Arch }}_Master_Test' ArtifactName: 'mrtk-build-${{ parameters.Arch }}' From b978b1f656fbb06069207ece3a6ad87e30175e6b Mon Sep 17 00:00:00 2001 From: Will Date: Tue, 21 May 2019 15:13:47 -0700 Subject: [PATCH 50/96] Update pipelines/templates/tasks/unitybuild.yml Co-Authored-By: Kurtis --- pipelines/templates/tasks/unitybuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/templates/tasks/unitybuild.yml b/pipelines/templates/tasks/unitybuild.yml index 4d4a5e76ecb..a72e85d0441 100644 --- a/pipelines/templates/tasks/unitybuild.yml +++ b/pipelines/templates/tasks/unitybuild.yml @@ -66,6 +66,6 @@ steps: PathtoPublish: '$outDir\AppPackages\MixedRealityToolkit\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.PackagingDir }}_Master_Test' # For .NET scripting backends, the naming is slightly different (mainly the AppPackages and MixedRealityToolkit folder # names are reversed, and the Architecture is part of the AppX name) - - ${{ if eq(parameters.ScriptingBackend, '.NET' }}: + - ${{ if eq(parameters.ScriptingBackend, '.NET') }}: PathtoPublish: '$outDir\MixedRealityToolkit\AppPackages\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.Arch }}_Master_Test' ArtifactName: 'mrtk-build-${{ parameters.Arch }}' From 0991f0497b75b2e788976263622e087e6d429406 Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Tue, 21 May 2019 15:43:39 -0700 Subject: [PATCH 51/96] Update Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs Co-Authored-By: Will --- .../BaseMixedRealityToolkitConfigurationProfileInspector.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs index ef1f87df341..620784a9dbb 100644 --- a/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs +++ b/Assets/MixedRealityToolkit/Inspectors/Profiles/BaseMixedRealityToolkitConfigurationProfileInspector.cs @@ -198,7 +198,7 @@ protected void RenderProfileHeader(string title, string description, Object sele } /// - /// If MRTK is in scene & input system is disabled, then show error message + /// If MRTK is in scene and input system is disabled, then show error message /// protected void RenderMixedRealityInputConfigured() { @@ -208,4 +208,4 @@ protected void RenderMixedRealityInputConfigured() } } } -} \ No newline at end of file +} From 074652da410b4c51ec46d4e075f9739713b216ce Mon Sep 17 00:00:00 2001 From: Will Date: Tue, 21 May 2019 15:13:55 -0700 Subject: [PATCH 52/96] Update pipelines/templates/tasks/unitybuild.yml Co-Authored-By: Kurtis --- pipelines/templates/tasks/unitybuild.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pipelines/templates/tasks/unitybuild.yml b/pipelines/templates/tasks/unitybuild.yml index a72e85d0441..408a09ff3ad 100644 --- a/pipelines/templates/tasks/unitybuild.yml +++ b/pipelines/templates/tasks/unitybuild.yml @@ -60,12 +60,12 @@ steps: - task: PublishBuildArtifacts@1 displayName: 'Publish ${{ parameters.Platform }} ${{ parameters.Arch }} (${{ parameters.PackagingDir }}) ${{ parameters.ScriptingBackend }}' inputs: + ArtifactName: 'mrtk-build-${{ parameters.Arch }}' # The final location of the generated package depends on the type of scripting backend it's built against. # For the default scripting backend (IL2CPP) the naming of the appx follows the form below: - - ${{ if eq(parameters.ScriptingBackend, 'default' }}: - PathtoPublish: '$outDir\AppPackages\MixedRealityToolkit\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.PackagingDir }}_Master_Test' + ${{ if eq(parameters.ScriptingBackend, 'default') }}: + PathtoPublish: '$(outDir)\AppPackages\MixedRealityToolkit\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.PackagingDir }}_Master_Test' # For .NET scripting backends, the naming is slightly different (mainly the AppPackages and MixedRealityToolkit folder # names are reversed, and the Architecture is part of the AppX name) - - ${{ if eq(parameters.ScriptingBackend, '.NET') }}: - PathtoPublish: '$outDir\MixedRealityToolkit\AppPackages\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.Arch }}_Master_Test' - ArtifactName: 'mrtk-build-${{ parameters.Arch }}' + ${{ if eq(parameters.ScriptingBackend, '.NET') }}: + PathtoPublish: '$(outDir)\MixedRealityToolkit\AppPackages\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.Arch }}_Master_Test' From f156a99342d68d9176d3405f9eec342e097b27cb Mon Sep 17 00:00:00 2001 From: Will Date: Tue, 21 May 2019 17:21:05 -0700 Subject: [PATCH 53/96] Update unitybuild.yml --- pipelines/templates/tasks/unitybuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/templates/tasks/unitybuild.yml b/pipelines/templates/tasks/unitybuild.yml index 408a09ff3ad..bacfa8c689a 100644 --- a/pipelines/templates/tasks/unitybuild.yml +++ b/pipelines/templates/tasks/unitybuild.yml @@ -64,8 +64,8 @@ steps: # The final location of the generated package depends on the type of scripting backend it's built against. # For the default scripting backend (IL2CPP) the naming of the appx follows the form below: ${{ if eq(parameters.ScriptingBackend, 'default') }}: - PathtoPublish: '$(outDir)\AppPackages\MixedRealityToolkit\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.PackagingDir }}_Master_Test' + PathtoPublish: '$(Build.ArtifactStagingDirectory)\build\${{ parameters.Platform }}_${{ parameters.Arch }}_${{ parameters.ScriptingBackend }}\AppPackages\MixedRealityToolkit\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.PackagingDir }}_Master_Test' # For .NET scripting backends, the naming is slightly different (mainly the AppPackages and MixedRealityToolkit folder # names are reversed, and the Architecture is part of the AppX name) ${{ if eq(parameters.ScriptingBackend, '.NET') }}: - PathtoPublish: '$(outDir)\MixedRealityToolkit\AppPackages\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.Arch }}_Master_Test' + PathtoPublish: '$(Build.ArtifactStagingDirectory)\build\${{ parameters.Platform }}_${{ parameters.Arch }}_${{ parameters.ScriptingBackend }}\MixedRealityToolkit\AppPackages\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.Arch }}_Master_Test' From b3c58b35e1de2d9c656b7d913c6c1a083d86e6e7 Mon Sep 17 00:00:00 2001 From: Will Date: Tue, 21 May 2019 18:41:48 -0700 Subject: [PATCH 54/96] Update unitybuild.yml --- pipelines/templates/tasks/unitybuild.yml | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pipelines/templates/tasks/unitybuild.yml b/pipelines/templates/tasks/unitybuild.yml index bacfa8c689a..36b49765608 100644 --- a/pipelines/templates/tasks/unitybuild.yml +++ b/pipelines/templates/tasks/unitybuild.yml @@ -56,16 +56,16 @@ steps: 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: - ArtifactName: 'mrtk-build-${{ parameters.Arch }}' - # The final location of the generated package depends on the type of scripting backend it's built against. - # For the default scripting backend (IL2CPP) the naming of the appx follows the form below: - ${{ if eq(parameters.ScriptingBackend, 'default') }}: - PathtoPublish: '$(Build.ArtifactStagingDirectory)\build\${{ parameters.Platform }}_${{ parameters.Arch }}_${{ parameters.ScriptingBackend }}\AppPackages\MixedRealityToolkit\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.PackagingDir }}_Master_Test' - # For .NET scripting backends, the naming is slightly different (mainly the AppPackages and MixedRealityToolkit folder - # names are reversed, and the Architecture is part of the AppX name) - ${{ if eq(parameters.ScriptingBackend, '.NET') }}: - PathtoPublish: '$(Build.ArtifactStagingDirectory)\build\${{ parameters.Platform }}_${{ parameters.Arch }}_${{ parameters.ScriptingBackend }}\MixedRealityToolkit\AppPackages\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.Arch }}_Master_Test' +- task: PublishBuildArtifacts@1 + enabled: parameters.PublishArtifacts + displayName: 'Publish ${{ parameters.Platform }} ${{ parameters.Arch }} (${{ parameters.PackagingDir }}) ${{ parameters.ScriptingBackend }}' + inputs: + ArtifactName: 'mrtk-build-${{ parameters.Arch }}' + # The final location of the generated package depends on the type of scripting backend it's built against. + # For the default scripting backend (IL2CPP) the naming of the appx follows the form below: + ${{ if eq(parameters.ScriptingBackend, 'default') }}: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\build\${{ parameters.Platform }}_${{ parameters.Arch }}_${{ parameters.ScriptingBackend }}\AppPackages\MixedRealityToolkit\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.PackagingDir }}_Master_Test' + # For .NET scripting backends, the naming is slightly different (mainly the AppPackages and MixedRealityToolkit folder + # names are reversed, and the Architecture is part of the AppX name) + ${{ if eq(parameters.ScriptingBackend, '.NET') }}: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\build\${{ parameters.Platform }}_${{ parameters.Arch }}_${{ parameters.ScriptingBackend }}\MixedRealityToolkit\AppPackages\MixedRealityToolkit_$(MRTKVersion).0_${{ parameters.Arch }}_Master_Test' From f6a0d368fa067e7a3fbaab7187a1b71e0f29ed87 Mon Sep 17 00:00:00 2001 From: Will Date: Tue, 21 May 2019 18:46:26 -0700 Subject: [PATCH 55/96] Update unitybuild.yml --- pipelines/templates/tasks/unitybuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/templates/tasks/unitybuild.yml b/pipelines/templates/tasks/unitybuild.yml index 36b49765608..8a960a60921 100644 --- a/pipelines/templates/tasks/unitybuild.yml +++ b/pipelines/templates/tasks/unitybuild.yml @@ -57,7 +57,7 @@ steps: displayName: "Build ${{ parameters.Platform }} ${{ parameters.Arch }} ${{ parameters.ScriptingBackend }}" - task: PublishBuildArtifacts@1 - enabled: parameters.PublishArtifacts + enabled: $(parameters.PublishArtifacts) displayName: 'Publish ${{ parameters.Platform }} ${{ parameters.Arch }} (${{ parameters.PackagingDir }}) ${{ parameters.ScriptingBackend }}' inputs: ArtifactName: 'mrtk-build-${{ parameters.Arch }}' From b105f8d7ae7a88652d364e106c3b44b2d14e9916 Mon Sep 17 00:00:00 2001 From: Will Date: Tue, 21 May 2019 20:07:16 -0700 Subject: [PATCH 56/96] Update unitybuild.yml --- pipelines/templates/tasks/unitybuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/templates/tasks/unitybuild.yml b/pipelines/templates/tasks/unitybuild.yml index 8a960a60921..02cf237192d 100644 --- a/pipelines/templates/tasks/unitybuild.yml +++ b/pipelines/templates/tasks/unitybuild.yml @@ -57,7 +57,7 @@ steps: displayName: "Build ${{ parameters.Platform }} ${{ parameters.Arch }} ${{ parameters.ScriptingBackend }}" - task: PublishBuildArtifacts@1 - enabled: $(parameters.PublishArtifacts) + enabled: ${{ parameters.PublishArtifacts }} displayName: 'Publish ${{ parameters.Platform }} ${{ parameters.Arch }} (${{ parameters.PackagingDir }}) ${{ parameters.ScriptingBackend }}' inputs: ArtifactName: 'mrtk-build-${{ parameters.Arch }}' From 67a6e6a368194bde6a2de7255ec0a60400ac56e9 Mon Sep 17 00:00:00 2001 From: Niall Milsom Date: Wed, 22 May 2019 10:34:41 +0100 Subject: [PATCH 57/96] enable unity cache server for all builds --- pipelines/ci-release.yml | 1 + pipelines/ci.yaml | 1 + pipelines/pr.yaml | 1 + pipelines/templates/tasks/unitybuild.yml | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pipelines/ci-release.yml b/pipelines/ci-release.yml index 354a7495bdf..40572196cc2 100644 --- a/pipelines/ci-release.yml +++ b/pipelines/ci-release.yml @@ -8,6 +8,7 @@ pool: name: Analog On-Prem demands: - Unity2018.3.7f1 # variable expansion not allowed here + - COG-UnityCache-WUS2-01 steps: - template: templates/common.yml diff --git a/pipelines/ci.yaml b/pipelines/ci.yaml index 2d1e13c27b1..a5499102e73 100644 --- a/pipelines/ci.yaml +++ b/pipelines/ci.yaml @@ -8,6 +8,7 @@ pool: name: On-Prem Unity demands: - Unity2018.3.7f1 + - COG-UnityCache-WUS2-01 steps: - template: templates/common.yml diff --git a/pipelines/pr.yaml b/pipelines/pr.yaml index e91d4343099..3261527c403 100644 --- a/pipelines/pr.yaml +++ b/pipelines/pr.yaml @@ -8,6 +8,7 @@ pool: name: On-Prem Unity demands: - Unity2018.3.7f1 + - COG-UnityCache-WUS2-01 steps: - template: templates/common.yml diff --git a/pipelines/templates/tasks/unitybuild.yml b/pipelines/templates/tasks/unitybuild.yml index 9f076fcf216..8f91cf7c410 100644 --- a/pipelines/templates/tasks/unitybuild.yml +++ b/pipelines/templates/tasks/unitybuild.yml @@ -38,7 +38,7 @@ steps: $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 + $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 -CacheServerIPAddress $(Unity.CacheServer.Address)" -PassThru $ljob = Start-Job -ScriptBlock { param($log) Get-Content "$log" -Wait } -ArgumentList $logFile.FullName while (-not $proc.HasExited -and $ljob.HasMoreData) From 80161ea79b9cc9e97fd1ee6175f96f2a27743790 Mon Sep 17 00:00:00 2001 From: Will Date: Wed, 22 May 2019 09:09:13 -0700 Subject: [PATCH 58/96] Update common.yml --- pipelines/templates/common.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pipelines/templates/common.yml b/pipelines/templates/common.yml index a7dc3f2748f..426b0ed6146 100644 --- a/pipelines/templates/common.yml +++ b/pipelines/templates/common.yml @@ -44,12 +44,5 @@ steps: Arch: 'x86' Platform: 'Standalone' -# Build Standalone x86 -- template: tasks/unitybuild.yml - parameters: - Arch: 'x86' - Platform: 'UWP' - ScriptingBackend: '.NET' - - template: assetretargeting.yml - template: tests.yml From d78796639ef83cc6f89ed4f406d37ba2fdd66e13 Mon Sep 17 00:00:00 2001 From: Will Wei Date: Wed, 22 May 2019 09:30:28 -0700 Subject: [PATCH 59/96] Update the bulid timeouts to 90 minutes --- pipelines/ci-release.yml | 1 + pipelines/ci.yaml | 1 + pipelines/pr.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/pipelines/ci-release.yml b/pipelines/ci-release.yml index 354a7495bdf..2088ec88dd2 100644 --- a/pipelines/ci-release.yml +++ b/pipelines/ci-release.yml @@ -8,6 +8,7 @@ pool: name: Analog On-Prem demands: - Unity2018.3.7f1 # variable expansion not allowed here + timeoutInMinutes: 90 steps: - template: templates/common.yml diff --git a/pipelines/ci.yaml b/pipelines/ci.yaml index 2d1e13c27b1..915113d11d4 100644 --- a/pipelines/ci.yaml +++ b/pipelines/ci.yaml @@ -8,6 +8,7 @@ pool: name: On-Prem Unity demands: - Unity2018.3.7f1 + timeoutInMinutes: 90 steps: - template: templates/common.yml diff --git a/pipelines/pr.yaml b/pipelines/pr.yaml index e91d4343099..6b597eeffd5 100644 --- a/pipelines/pr.yaml +++ b/pipelines/pr.yaml @@ -8,6 +8,7 @@ pool: name: On-Prem Unity demands: - Unity2018.3.7f1 + timeoutInMinutes: 90 steps: - template: templates/common.yml From 0077e17af0286d47abfa40e7b47e8d54f910e42c Mon Sep 17 00:00:00 2001 From: Will Wei Date: Wed, 22 May 2019 10:19:01 -0700 Subject: [PATCH 60/96] Update the pipelines to have correct timeoutInMinutes specifications --- pipelines/ci-release.yml | 24 ++++++++++++------------ pipelines/ci.yaml | 21 +++++++++++---------- pipelines/pr.yaml | 2 +- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/pipelines/ci-release.yml b/pipelines/ci-release.yml index cb41cfd6121..ab0f9c64bd8 100644 --- a/pipelines/ci-release.yml +++ b/pipelines/ci-release.yml @@ -4,15 +4,15 @@ variables: UnityVersion: Unity2018.3.7f1 MRTKVersion: 2.0.0 -pool: - name: Analog On-Prem - demands: - - Unity2018.3.7f1 # variable expansion not allowed here - - COG-UnityCache-WUS2-01 - timeoutInMinutes: 90 - -steps: -- template: templates/common.yml -- template: templates/package.yml -- template: templates/releasesigning.yml -- template: templates/end.yml +jobs: +- job: CIReleaseValidation + pool: + name: Analog On-Prem + demands: + - Unity2018.3.7f1 # variable expansion not allowed here + - COG-UnityCache-WUS2-01 + 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 index 00ec8d8cc97..8c637c50f56 100644 --- a/pipelines/ci.yaml +++ b/pipelines/ci.yaml @@ -4,14 +4,15 @@ variables: UnityVersion: Unity2018.3.7f1 MRTKVersion: 2.0.0 -pool: - name: On-Prem Unity - demands: - - Unity2018.3.7f1 - - COG-UnityCache-WUS2-01 +jobs: +- job: CIDeveloperValidation timeoutInMinutes: 90 - -steps: -- template: templates/common.yml -- template: templates/package.yml -- template: templates/end.yml + pool: + name: On-Prem Unity + demands: + - Unity2018.3.7f1 + - COG-UnityCache-WUS2-01 + steps: + - template: templates/common.yml + - template: templates/package.yml + - template: templates/end.yml diff --git a/pipelines/pr.yaml b/pipelines/pr.yaml index 3f8504b094e..0186c891b16 100644 --- a/pipelines/pr.yaml +++ b/pipelines/pr.yaml @@ -5,7 +5,7 @@ variables: MRTKVersion: 2.0.0 jobs: -- job: PR Validation +- job: PRValidation timeoutInMinutes: 90 pool: name: On-Prem Unity From 0761fc6706dbf1ef6beeb3409a2c7d9d55faf798 Mon Sep 17 00:00:00 2001 From: Yoon Park Date: Wed, 22 May 2019 10:52:38 -0700 Subject: [PATCH 61/96] Removing redundant PressableButtonExamples scene. --- .../Demos/UX/PressableButton.meta | 8 - .../Demos/UX/PressableButton/Scenes.meta | 8 - .../Scenes/PressableButtonExample.unity | 1859 ----------------- .../Scenes/PressableButtonExample.unity.meta | 7 - 4 files changed, 1882 deletions(-) delete mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton.meta delete mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes.meta delete mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity delete mode 100644 Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton.meta b/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton.meta deleted file mode 100644 index 698e43a1974..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dd7302bc1ae794849a4709f37390df95 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes.meta b/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes.meta deleted file mode 100644 index 23f4ba0a407..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a0d91b357ef3d224c99b37976d0e878e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity b/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity deleted file mode 100644 index 623dc57f251..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity +++ /dev/null @@ -1,1859 +0,0 @@ -%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: 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, g: 0, b: 0, 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: 0 - m_LightmapEditorSettings: - serializedVersion: 10 - m_Resolution: 2 - m_BakeResolution: 10 - m_AtlasSize: 512 - 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: 256 - 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 &79500390 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 79500393} - - component: {fileID: 79500392} - - component: {fileID: 79500391} - - component: {fileID: 79500394} - m_Layer: 0 - m_Name: GameObject - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &79500391 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 79500390} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4684083f6dff4a1d8a790bccc354fcf4, type: 3} - m_Name: - m_EditorClassIdentifier: - updateLinkedTransform: 0 - moveLerpTime: 0.1 - rotateLerpTime: 0.1 - scaleLerpTime: 0 - maintainScale: 1 - smoothing: 1 - lifetime: 0 - SolverHandler: {fileID: 79500392} - referenceDirection: 1 - minDistance: 0.3 - maxDistance: 0.4 - minViewDegrees: 0 - maxViewDegrees: 30 - aspectV: 1 - ignoreAngleClamp: 0 - ignoreDistanceClamp: 0 - orientToReferenceDirection: 0 ---- !u!114 &79500392 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 79500390} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b55691ad5b034fe6966763a6e23818d2, type: 3} - m_Name: - m_EditorClassIdentifier: - handedness: 0 - trackedObjectToReference: 0 - trackedHandJoint: 2 - additionalOffset: {x: 0, y: 0, z: 0} - additionalRotation: {x: 0, y: 0, z: 0} - transformTarget: {fileID: 0} - updateSolvers: 1 ---- !u!4 &79500393 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 79500390} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.4} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1761586764} - - {fileID: 2135770287} - - {fileID: 1666571016} - - {fileID: 1690813623} - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &79500394 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 79500390} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: aac8947e5365fbc4b92cf44894cb3d2b, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &145853267 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1666571016} - m_Modifications: - - target: {fileID: 316800718, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Name - value: Pressable Button (3) - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783104, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.x - value: 0.06 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_RootOrder - value: 3 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2406973081839446391, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} ---- !u!4 &145853268 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - m_PrefabInstance: {fileID: 145853267} - m_PrefabAsset: {fileID: 0} ---- !u!1 &170076733 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 170076735} - - component: {fileID: 170076734} - 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 &170076734 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 170076733} - 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: 1 - 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 &170076735 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 170076733} - 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!1001 &243586058 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1690813623} - m_Modifications: - - target: {fileID: 316800718, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Name - value: Pressable Button - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783104, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.x - value: -0.06 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2406973081839446391, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} ---- !u!4 &243586059 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - m_PrefabInstance: {fileID: 243586058} - m_PrefabAsset: {fileID: 0} ---- !u!1001 &247630674 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1666571016} - m_Modifications: - - target: {fileID: 316800718, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Name - value: Pressable Button (1) - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783104, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.x - value: -0.02 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2406973081839446391, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: Profiles.Array.data[0].Target - value: - objectReference: {fileID: 1666522120304061407} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: Profiles.Array.data[0].Themes.Array.data[0] - value: - objectReference: {fileID: 11400000, guid: 0c4c73f326f602744bdcfff481fd6f20, - type: 2} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} ---- !u!4 &247630675 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - m_PrefabInstance: {fileID: 247630674} - m_PrefabAsset: {fileID: 0} ---- !u!1 &379209410 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 379209411} - - component: {fileID: 379209413} - - component: {fileID: 379209412} - m_Layer: 0 - m_Name: Label (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &379209411 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 379209410} - m_LocalRotation: {x: -0, y: 0.11421704, z: -0, w: 0.9934558} - m_LocalPosition: {x: 0, y: -1.34, z: 0} - m_LocalScale: {x: 0.099999994, y: 0.099999994, z: 0.099999994} - m_Children: [] - m_Father: {fileID: 1761586764} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 13.117001, z: 0} ---- !u!102 &379209412 -TextMesh: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 379209410} - m_Text: "^\nCycles color on \nsuccessful clicks" - m_OffsetZ: 0 - m_CharacterSize: 1 - m_LineSpacing: 1 - m_Anchor: 4 - m_Alignment: 1 - 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!23 &379209413 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 379209410} - 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: 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!1001 &401146608 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1690813623} - m_Modifications: - - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Name - value: Pressable Button With Backplate (1) - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalPosition.x - value: -0.02 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4607504470098667674, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 7060011145322376313, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7060011145322376313, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_isInputParsingRequired - value: 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: 2204069620958546074, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 2204069620958546074, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - - target: {fileID: 8779034279059886464, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 8779034279059886464, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} ---- !u!4 &401146609 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - m_PrefabInstance: {fileID: 401146608} - m_PrefabAsset: {fileID: 0} ---- !u!1 &487866777 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 487866779} - - component: {fileID: 487866778} - m_Layer: 0 - m_Name: AsyncCoroutineRunner - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &487866778 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 487866777} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8e6ecbbf0b5840b09d7b4ee7f0a62b7a, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &487866779 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 487866777} - 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 &509045570 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 509045572} - - component: {fileID: 509045571} - m_Layer: 0 - m_Name: MixedRealityToolkit - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &509045571 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 509045570} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 83d9acc7968244a8886f3af591305bcb, type: 3} - m_Name: - m_EditorClassIdentifier: - activeProfile: {fileID: 11400000, guid: 31a611a779d3499e8e35f1a2018ca841, type: 2} ---- !u!4 &509045572 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 509045570} - 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: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &534669902 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 534669905} - - component: {fileID: 534669904} - - component: {fileID: 534669903} - - component: {fileID: 534669908} - - component: {fileID: 534669907} - - component: {fileID: 534669906} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &534669903 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 534669902} - m_Enabled: 1 ---- !u!20 &534669904 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 534669902} - 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!4 &534669905 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 534669902} - 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: 1755076300} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &534669906 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 534669902} - 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 - useEyeTracking: 0 ---- !u!114 &534669907 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 534669902} - 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 &534669908 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 534669902} - 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!1001 &1119914264 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1690813623} - m_Modifications: - - target: {fileID: 316800718, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Name - value: Pressable Button (1) - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783104, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.x - value: 0.02 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2406973081839446391, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} ---- !u!4 &1119914265 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - m_PrefabInstance: {fileID: 1119914264} - m_PrefabAsset: {fileID: 0} ---- !u!1001 &1207963221 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1666571016} - m_Modifications: - - target: {fileID: 316800718, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Name - value: Pressable Button (2) - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783104, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.x - value: 0.02 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2406973081839446391, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} ---- !u!4 &1207963222 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - m_PrefabInstance: {fileID: 1207963221} - m_PrefabAsset: {fileID: 0} ---- !u!1001 &1378287678 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1666571016} - m_Modifications: - - target: {fileID: 316800718, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Name - value: Pressable Button - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783102, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 937783104, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.x - value: -0.06 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2406973081839446391, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 7440800412470431853, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 9181818329810857364, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - propertyPath: m_isInputParsingRequired - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 247466359, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, type: 3} ---- !u!4 &1378287679 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 1944713263, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - m_PrefabInstance: {fileID: 1378287678} - m_PrefabAsset: {fileID: 0} ---- !u!1 &1666571015 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1666571016} - - component: {fileID: 1666571017} - m_Layer: 0 - m_Name: Shared Backplate - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1666571016 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1666571015} - 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: 1378287679} - - {fileID: 247630675} - - {fileID: 1207963222} - - {fileID: 145853268} - m_Father: {fileID: 79500393} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1666571017 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1666571015} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: cf12ee76e7e00a44a9a84256760020e6, type: 3} - m_Name: - m_EditorClassIdentifier: - ignoreInactiveTransforms: 1 - sortType: 0 - surfaceType: 1 - orientType: 3 - layout: 0 - radius: 2 - radialRange: 60 - rows: 1 - cellWidth: 0.04 - cellHeight: 0.04 ---- !u!1 &1690813622 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1690813623} - - component: {fileID: 1690813624} - m_Layer: 0 - m_Name: No Backplate - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1690813623 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1690813622} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -0.0485, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 243586059} - - {fileID: 401146609} - - {fileID: 1119914265} - - {fileID: 1891867054} - m_Father: {fileID: 79500393} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1690813624 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1690813622} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: cf12ee76e7e00a44a9a84256760020e6, type: 3} - m_Name: - m_EditorClassIdentifier: - ignoreInactiveTransforms: 1 - sortType: 0 - surfaceType: 1 - orientType: 3 - layout: 0 - radius: 2 - radialRange: 60 - rows: 1 - cellWidth: 0.04 - cellHeight: 0.04 ---- !u!1 &1755076299 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1755076300} - m_Layer: 0 - m_Name: MixedRealityPlayspace - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1755076300 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1755076299} - 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: 534669905} - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1761586763 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1761586764} - - component: {fileID: 1761586767} - - component: {fileID: 1761586766} - - component: {fileID: 1761586765} - - component: {fileID: 1761586768} - m_Layer: 0 - m_Name: Click Indicator - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1761586764 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1761586763} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.164, y: 0, z: 0} - m_LocalScale: {x: 0.05, y: 0.05, z: 0.05} - m_Children: - - {fileID: 379209411} - m_Father: {fileID: 79500393} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &1761586765 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1761586763} - 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!23 &1761586766 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1761586763} - 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 &1761586767 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1761586763} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1761586768 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1761586763} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 494f23d66f4f1fe40ab0ee05fe75e766, type: 3} - m_Name: - m_EditorClassIdentifier: - rend: {fileID: 1761586766} - mats: - - {fileID: 2100000, guid: 3c55769e893c4f4c8c51b7fa69bee2b9, type: 2} - - {fileID: 2100000, guid: 00665e2a669d4b0fab1965843b4c914b, type: 2} - - {fileID: 2100000, guid: c4a1b7475a654dd0acaa0cfdfba2e20c, type: 2} - cur: 0 ---- !u!1001 &1891867053 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1690813623} - m_Modifications: - - target: {fileID: 2204069621426241315, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Name - value: Pressable Button With Backplate - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalPosition.x - value: 0.06 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_RootOrder - value: 3 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4607504470098667674, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 0} - - target: {fileID: 7060011145322376313, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_havePropertiesChanged - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7060011145322376313, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: m_isInputParsingRequired - value: 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: 2204069620958546074, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 2204069620958546074, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - - target: {fileID: 8779034279059886464, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 1761586768} - - target: {fileID: 8779034279059886464, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - propertyPath: OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: Increment - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} ---- !u!4 &1891867054 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, - type: 3} - m_PrefabInstance: {fileID: 1891867053} - m_PrefabAsset: {fileID: 0} ---- !u!1001 &2135770286 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 79500393} - m_Modifications: - - target: {fileID: 538639403742340272, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_Name - value: 32x32mm_Square - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalPosition.z - value: 0.008 - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalScale.x - value: 5.2269 - objectReference: {fileID: 0} - - target: {fileID: 2207647899000345742, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_LocalScale.x - value: 0.152 - objectReference: {fileID: 0} - - target: {fileID: 2207647899002115694, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 8aa99e172954b7d498b6726b73ac3832, type: 2} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 9215a7c858170d74fb2257375d5feaf1, type: 3} ---- !u!4 &2135770287 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 586303850521236049, guid: 9215a7c858170d74fb2257375d5feaf1, - type: 3} - m_PrefabInstance: {fileID: 2135770286} - m_PrefabAsset: {fileID: 0} ---- !u!1 &1666522120304061407 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 329340111926477333, guid: 45fd0ad89d6d17b4fbe68eb48dbe9de9, - type: 3} - m_PrefabInstance: {fileID: 247630674} - m_PrefabAsset: {fileID: 0} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity.meta deleted file mode 100644 index 4e6fbe1022b..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/PressableButton/Scenes/PressableButtonExample.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: b2d06bb8d7f107d4783a56c796c5c120 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: From f379b3ed251ba7c3a3db3238a84da1b0bfa32f4b Mon Sep 17 00:00:00 2001 From: Kurtis Date: Wed, 22 May 2019 11:30:20 -0700 Subject: [PATCH 62/96] Wrap non-2019 compatible code --- .../Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs b/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs index e39b3a8d85a..584030acfcd 100644 --- a/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs +++ b/Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs @@ -88,6 +88,7 @@ public static BuildReport BuildUnityPlayer(IBuildInfo buildInfo) { PlayerSettings.SetScriptingBackend(buildTargetGroup, buildInfo.ScriptingBackend.Value); +#if !UNITY_2019_1_OR_NEWER // 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 @@ -96,6 +97,7 @@ public static BuildReport BuildUnityPlayer(IBuildInfo buildInfo) { EditorUserBuildSettings.wsaGenerateReferenceProjects = true; } +#endif } BuildTarget oldBuildTarget = EditorUserBuildSettings.activeBuildTarget; From dbec0d7e3f17a9030bd980fb433989190ed9dca8 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Wed, 22 May 2019 12:30:14 -0700 Subject: [PATCH 63/96] Fix cursor not showing in HL1 and add unit tests --- .../InputSystem/FocusProvider.cs | 11 ++- .../GazePointerVisibilityStateMachine.cs | 13 ++- .../GazePointerStateMachineTests.cs | 99 +++++++++++++++---- 3 files changed, 101 insertions(+), 22 deletions(-) diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs b/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs index ac760b4625e..0b44dd4ddfd 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs @@ -857,6 +857,7 @@ private void ReconcilePointers() var gazePointer = gazeProviderPointingData?.Pointer as GenericPointer; NumFarPointersActive = 0; NumNearPointersActive = 0; + int numFarPointersWithoutCursorActive = 0; foreach (var pointerData in pointers) { @@ -867,7 +868,9 @@ private void ReconcilePointers() NumNearPointersActive++; } } - else if (pointerData.Pointer.BaseCursor != null + else if ( + // pointerData.Pointer.BaseCursor == null means this is a GGV Pointer + pointerData.Pointer.BaseCursor != null && !(pointerData.Pointer == gazePointer) && pointerData.Pointer.IsInteractionEnabled) { @@ -875,12 +878,18 @@ private void ReconcilePointers() // hand input or the gamepad, we want to show the cursor still. NumFarPointersActive++; } + else if (pointerData.Pointer.BaseCursor == null + && pointerData.Pointer.IsInteractionEnabled) + { + numFarPointersWithoutCursorActive++; + } } if (gazePointer != null) { gazePointerStateMachine.UpdateState( NumNearPointersActive, NumFarPointersActive, + numFarPointersWithoutCursorActive, InputSystem.EyeGazeProvider.IsEyeGazeValid); // The gaze cursor's visibility is controlled by IsInteractionEnabled diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs b/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs index 0242c035c43..3e46eeeb899 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/GazePointerVisibilityStateMachine.cs @@ -43,7 +43,7 @@ public bool IsGazePointerActive /// 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) + public void UpdateState(int numNearPointersActive, int numFarPointersActive, int numFarPointersWithoutCursorActive, bool isEyeGazeValid) { if (eyeGazeValid != isEyeGazeValid) { @@ -57,7 +57,7 @@ public void UpdateState(int numNearPointersActive, int numFarPointersActive, boo } else { - UpdateStateHeadGaze(numNearPointersActive, numFarPointersActive); + UpdateStateHeadGaze(numNearPointersActive, numFarPointersActive, numFarPointersWithoutCursorActive); } } @@ -72,9 +72,9 @@ private void UpdateStateEyeGaze(int numNearPointersActive, int numFarPointersAct GazePointerState.GazePointerInactive; } - private void UpdateStateHeadGaze(int numNearPointersActive, int numFarPointersActive) + private void UpdateStateHeadGaze(int numNearPointersActive, int numFarPointersActive, int numFarPointersWithoutCursorActive) { - bool canGazeCursorShow = numFarPointersActive == 1 && numNearPointersActive == 0; + bool canGazeCursorShow = numFarPointersActive == 0 && numNearPointersActive == 0; switch (gazePointerState) { case GazePointerState.Initial: @@ -100,6 +100,11 @@ private void UpdateStateHeadGaze(int numNearPointersActive, int numFarPointersAc activateGazeKeywordIsSet = false; gazePointerState = GazePointerState.GazePointerActive; } + if (canGazeCursorShow && numFarPointersWithoutCursorActive > 0) + { + activateGazeKeywordIsSet = false; + gazePointerState = GazePointerState.GazePointerActive; + } break; default: break; diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs index 8cb169d48ce..257f0dccc2d 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs @@ -24,35 +24,100 @@ public void TestHeadGazeHandAndSpeechBehaviour() 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); + gsm.UpdateState(1 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, 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); + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, false); FireSelectKeyword(gsm); - gsm.UpdateState(0 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, false); + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, 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); + gsm.UpdateState(1 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, false); + gsm.UpdateState(1 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, 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); + gsm.UpdateState(0 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, 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); + gsm.UpdateState(0 /*numNearPointersActive*/, 2 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, false); Assert.IsFalse(gsm.IsGazePointerActive, "Head gaze pointer should be hidden in the presence of another far pointer"); } + [Test] + /// + /// Tests scenarios when the hands are in HoloLens 1 mode (GGV behavior). + /// GGV stands for gaze, gesture, voice. + /// + public void TestHeadGazeHoloLens1GGV() + { + TestUtilities.InitializeMixedRealityToolkitScene(true); + + // Initial state: gaze pointer active + var gsm = new GazePointerVisibilityStateMachine(); + Assert.IsTrue(gsm.IsGazePointerActive, "Head gaze pointer should be visible on start"); + + // Note that in these tests numFarPointersWithoutCursorActive is 1 here. The GGV pointer is a pointer that does not have + // a base cursor associated with it, there is one of these for each hand. + + + // When a hand is raised in HoloLens 1 there will be no near pointers. Gaze cursor should stay on + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 2 /*numFarPointersWithoutCursorActive*/, false); + Assert.IsTrue(gsm.IsGazePointerActive, "After hand is raised, head gaze pointer should not go away"); + + // Saying "select" should have no impact on the state of HoloLens 1 interactions. + FireSelectKeyword(gsm); + Assert.IsTrue(gsm.IsGazePointerActive, "Saying 'select' should have no impact on HoloLens 1"); + } + + [Test] + /// + /// Tests scenarios when we have articulated hands (HoloLens 2), but the hands + /// are using the GGV pointers / we are emulating HoloLens 1 behavior + /// + public void TestHeadGazeGGVArticulatedHands() + { + TestUtilities.InitializeMixedRealityToolkitScene(true); + + // Initial state: gaze pointer active + var gsm = new GazePointerVisibilityStateMachine(); + Assert.IsTrue(gsm.IsGazePointerActive, "Head gaze pointer should be visible on start"); + + // Note that in these tests numFarPointersWithoutCursorActive is 1 here. The GGV pointer is a pointer that does not have + // a base cursor associated with it, there is one of these for each hand. + + // When a hand is raised there will be a frame when the near pointer is active. Cursor should go away + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 2 /*numFarPointersWithoutCursorActive*/, false); + Assert.IsFalse(gsm.IsGazePointerActive, "After hand is raised, head gaze pointer should go away"); + + // Shortly after the near pointer for the hand will be disabled if there is nothing nearby + // The gaze cursor should now appear + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 2 /*numFarPointersWithoutCursorActive*/, false); + Assert.IsTrue(gsm.IsGazePointerActive, "If hand is not near anything, the gaze cursor should show up again (gaze cursor disappears when hand is near something)"); + + // If a near pointer appears again, the gaze cursor should go away + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 2 /*numFarPointersWithoutCursorActive*/, false); + Assert.IsFalse(gsm.IsGazePointerActive, "If hand goes near a grabbable, the gaze cursor should disappear"); + + + // Saying "select" should have no impact on the state of interactions. + FireSelectKeyword(gsm); + Assert.IsFalse(gsm.IsGazePointerActive, "Saying 'select' should have no impact on GGV articulated hands"); + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 2 /*numFarPointersWithoutCursorActive*/, false); + FireSelectKeyword(gsm); + Assert.IsTrue(gsm.IsGazePointerActive, "Saying 'select' should have no impact on GGV articulated hands"); + + } + [Test] public void TestEyeGazeHandAndSpeechBehaviour() { @@ -64,15 +129,15 @@ public void TestEyeGazeHandAndSpeechBehaviour() // 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); + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, 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); + gsm.UpdateState(0 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, 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); + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, 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. @@ -81,7 +146,7 @@ public void TestEyeGazeHandAndSpeechBehaviour() // 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); + gsm.UpdateState(1 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, true); Assert.IsFalse(gsm.IsGazePointerActive, "With far and near interaction, gaze pointer should go away"); } @@ -96,11 +161,11 @@ public void TestEyeGazeToHeadGazeTransition() // 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); + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, 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); + gsm.UpdateState(0 /*numNearPointersActive*/, 1 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, 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 @@ -113,12 +178,12 @@ public void TestEyeGazeToHeadGazeTransition() // 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); + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, 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); + gsm.UpdateState(0 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, false); Assert.IsTrue(gsm.IsGazePointerActive, "Gaze pointer should be active"); } @@ -132,12 +197,12 @@ public void TestHeadGazeToEyeGazeTransition() 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); + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, 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); + gsm.UpdateState(1 /*numNearPointersActive*/, 0 /*numFarPointersActive*/, 0 /*numFarPointersWithoutCursorActive*/, true); Assert.IsTrue(gsm.IsGazePointerActive, "With near interaction and eye gaze, gaze pointer should be active"); } From 832b8e93a553de2166031b0a0cfdf610c0820c56 Mon Sep 17 00:00:00 2001 From: Will Wei Date: Wed, 22 May 2019 16:04:22 -0700 Subject: [PATCH 64/96] Update the Hand Interaction Examples scene to use the Default HoloLens 2 profile --- ...ityRegisteredServiceProvidersProfile.asset | 16 ---- ...gisteredServiceProvidersProfile.asset.meta | 8 -- ...edRealityToolkitConfigurationProfile.asset | 50 ---------- ...lityToolkitConfigurationProfile.asset.meta | 8 -- .../Scenes/HandInteractionExamples.unity | 92 +++++++++---------- 5 files changed, 46 insertions(+), 128 deletions(-) delete mode 100644 Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityRegisteredServiceProvidersProfile.asset delete mode 100644 Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityRegisteredServiceProvidersProfile.asset.meta delete mode 100644 Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset delete mode 100644 Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityRegisteredServiceProvidersProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityRegisteredServiceProvidersProfile.asset deleted file mode 100644 index e86b4933848..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityRegisteredServiceProvidersProfile.asset +++ /dev/null @@ -1,16 +0,0 @@ -%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: eebbca41bb0b40d298ef201735d08616, type: 3} - m_Name: HandInteractionAllExampleMixedRealityRegisteredServiceProvidersProfile - m_EditorClassIdentifier: - isCustomProfile: 1 - configurations: [] diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityRegisteredServiceProvidersProfile.asset.meta b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityRegisteredServiceProvidersProfile.asset.meta deleted file mode 100644 index b393f4a84e4..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityRegisteredServiceProvidersProfile.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e0bbb696e100b0d4386ce57da2e4636d -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset deleted file mode 100644 index 7ee4c2f45bd..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset +++ /dev/null @@ -1,50 +0,0 @@ -%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_GeneratorAsset: {fileID: 0} - m_Script: {fileID: 11500000, guid: 7612acbc1a4a4ed0afa5f4ccbe42bee4, type: 3} - m_Name: HandInteractionAllExampleMixedRealityToolkitConfigurationProfile - 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: ad2080e8e71c35f4e8bcde94fa68f098, 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: 0} - 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: e0bbb696e100b0d4386ce57da2e4636d, - type: 2} - useServiceInspectors: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset.meta b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset.meta deleted file mode 100644 index cab371eabf5..00000000000 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/CustomProfiles/HandInteractionAllExampleMixedRealityToolkitConfigurationProfile.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2c80e638bfca01246bfda56fb185b1d2 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity index fbbd5c8e834..5632f499397 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity @@ -379,6 +379,11 @@ 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: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -449,11 +454,6 @@ 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 @@ -3627,6 +3627,11 @@ 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: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -3697,11 +3702,6 @@ 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 @@ -9273,7 +9273,7 @@ Camera: m_GameObject: {fileID: 1087739255} m_Enabled: 1 serializedVersion: 2 - m_ClearFlags: 1 + m_ClearFlags: 2 m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1} m_projectionMatrixMode: 1 m_SensorSize: {x: 36, y: 24} @@ -10068,6 +10068,11 @@ 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: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -10138,11 +10143,6 @@ 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 @@ -10736,6 +10736,11 @@ 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: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -10806,11 +10811,6 @@ 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 @@ -12242,6 +12242,11 @@ 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: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -12312,11 +12317,6 @@ 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 @@ -13613,6 +13613,11 @@ 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: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -13683,11 +13688,6 @@ 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 @@ -15540,6 +15540,11 @@ 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: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -15610,11 +15615,6 @@ 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 @@ -16134,7 +16134,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 83d9acc7968244a8886f3af591305bcb, type: 3} m_Name: m_EditorClassIdentifier: - activeProfile: {fileID: 11400000, guid: 2c80e638bfca01246bfda56fb185b1d2, type: 2} + activeProfile: {fileID: 11400000, guid: 7e7c962b9eb9dfa44993d5b2f2576752, type: 2} --- !u!4 &1721422931 Transform: m_ObjectHideFlags: 0 @@ -17815,10 +17815,6 @@ PrefabInstance: propertyPath: m_Name value: CoffeeCup objectReference: {fileID: 0} - - 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 @@ -17875,6 +17871,10 @@ PrefabInstance: propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d5334c45caee46be937b095a1e977dc6, type: 2} + - target: {fileID: 400000, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} + propertyPath: m_LocalPosition.y + value: 1.896 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: e963263242b6cbb4bbbf279f0c0e7789, type: 3} --- !u!4 &2045373141 stripped @@ -18408,6 +18408,11 @@ 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: 2204069623020599746, guid: 3f1f46cbecbe08e46a303ccfdb5b498a, type: 3} propertyPath: m_LocalPosition.x @@ -18478,11 +18483,6 @@ 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 From abb5567edeab1ed428517894a85865dc7f1e779a Mon Sep 17 00:00:00 2001 From: "George O. Johnston" Date: Wed, 22 May 2019 16:08:06 -0700 Subject: [PATCH 65/96] Use SolverUpdateEntry instead of SolverUpdate so that lifetime considerations are honored. --- .../Features/Utilities/Solvers/SolverHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/SolverHandler.cs b/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/SolverHandler.cs index 41a8d431ade..cd78d4c6b19 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/SolverHandler.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/Utilities/Solvers/SolverHandler.cs @@ -182,7 +182,7 @@ private void LateUpdate() if (solver.enabled) { - solver.SolverUpdate(); + solver.SolverUpdateEntry(); } } } From 4687cb25322670fba06158e93e80ec0e015d075d Mon Sep 17 00:00:00 2001 From: Malcolm Tyrrell <36992510+MalcolmTyrrell@users.noreply.github.com> Date: Thu, 23 May 2019 16:30:02 +0100 Subject: [PATCH 66/96] You may not get prompted I wasn't prompted when opening the HandInteractionExamples. I think this was because I followed the steps in the previous section and was prompted then. --- Documentation/GettingStartedWithTheMRTK.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/GettingStartedWithTheMRTK.md b/Documentation/GettingStartedWithTheMRTK.md index 8847e69edfa..79e41239421 100644 --- a/Documentation/GettingStartedWithTheMRTK.md +++ b/Documentation/GettingStartedWithTheMRTK.md @@ -62,15 +62,15 @@ The [hand interaction examples scene](README_HandInteractionExamples.md) is a gr 1. Create a new Unity project and then import both the **Foundation** and **Examples** unity packages following [the steps above](#import-mrtk-packages-into-your-unity-project). 2. Open the HandInteractionExamples scene under `Assets\MixedRealityToolkit.Examples\Demos\HandTracking\Scenes\HandInteractionExamples` -3. You will get a prompt asking you to import "TMP Essentials". +3. You may get a prompt asking you to import "TMP Essentials". ![TMP Essentials](../Documentation/Images/getting_started/MRTK_GettingStarted_TMPro.png) -4. Select "Import TMP essentials" button. "TMP Essentials" refers to TextMeshPro plugin, which some of the MRTK examples use for improved text rendering. +If you get such a prompt, select "Import TMP essentials" button. "TMP Essentials" refers to TextMeshPro plugin, which some of the MRTK examples use for improved text rendering. -5. Close the TMPPro dialog. After this you need to reload the scene, so close and re-open your scene. +4. Close the TMPPro dialog. After this you need to reload the scene, so close and re-open your scene. -6. Press the play button. +5. 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. From 35768e809f841fd9b0c4a7616ef2825b2939513c Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 11:33:21 -0700 Subject: [PATCH 67/96] Add test for toggling HideElementsInInspector --- .../Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index 51ce601ea16..5002b1ef50b 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -52,6 +52,14 @@ private IEnumerator Sequence() var mh = cube.AddComponent(); yield return WaitForSpeechCommand(); + SetStatus("HideElementsInInspector true"); + bbox.HideElementsInInspector = true; + yield return WaitForSpeechCommand(); + + SetStatus("HideElementsInInspector false"); + bbox.HideElementsInInspector = false; + yield return WaitForSpeechCommand(); + SetStatus("FlattenX"); bbox.FlattenAxis = BoundingBox.FlattenModeType.FlattenX; yield return WaitForSpeechCommand(); From c12bf643a7a4f64fd1dce86caa87fb4dbd6589f0 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 11:37:38 -0700 Subject: [PATCH 68/96] Make HideElementsInInspector settable from code. --- .../UX/Scripts/BoundingBox/BoundingBox.cs | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index fa4b310a568..c06647fd002 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -1,6 +1,7 @@ // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Input; +using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; @@ -499,11 +500,35 @@ public bool HideElementsInInspector if (hideElementsInInspector != value) { hideElementsInInspector = value; - CreateRig(); + UpdateRigVisibilityInInspector(); } } } + private void UpdateRigVisibilityInInspector() + { + HideFlags desiredFlags = hideElementsInInspector ? HideFlags.HideInHierarchy | HideFlags.HideInInspector : HideFlags.None; + foreach (var cube in corners) + { + cube.hideFlags = desiredFlags; + } + + if (boxDisplay != null) + { + boxDisplay.hideFlags = desiredFlags; + } + + if (rigRoot != null) + { + rigRoot.hideFlags = desiredFlags; + } + + foreach (var link in links) + { + link.hideFlags = desiredFlags; + } + } + [Header("Events")] public UnityEvent RotateStarted; public UnityEvent RotateStopped; @@ -718,6 +743,7 @@ private void CreateRig() Flatten(); ResetHandleVisibility(); rigRoot.gameObject.SetActive(active); + UpdateRigVisibilityInInspector(); } private void DestroyRig() @@ -848,10 +874,7 @@ private void AddCorners() { GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); cube.name = "corner_" + i.ToString(); - if (hideElementsInInspector == true) - { - cube.hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector; - } + cube.transform.localScale = new Vector3(scaleHandleSize, scaleHandleSize, scaleHandleSize); cube.transform.position = boundsCorners[i]; @@ -915,10 +938,6 @@ private void AddCorners() ApplyMaterialToAllRenderers(cornerVisuals, handleMaterial); - if (hideElementsInInspector == true) - { - corner.hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector; - } corners.Add(corner.transform); } @@ -951,10 +970,6 @@ private void AddLinks() { GameObject ball = GameObject.CreatePrimitive(PrimitiveType.Sphere); ball.name = "midpoint_" + i.ToString(); - if (hideElementsInInspector == true) - { - ball.hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector; - } ball.transform.localScale = new Vector3(rotationHandleDiameter, rotationHandleDiameter, rotationHandleDiameter); ball.transform.position = edgeCenters[i]; @@ -994,11 +1009,6 @@ private void AddLinks() ApplyMaterialToAllRenderers(ball, handleMaterial); - if (hideElementsInInspector == true) - { - ball.hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector; - } - balls.Add(ball.transform); } } @@ -1035,10 +1045,7 @@ private void AddLinks() Destroy(link.GetComponent()); } link.name = "link_" + i.ToString(); - if (hideElementsInInspector == true) - { - link.hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector; - } + Vector3 linkDimensions = GetLinkDimensions(); if (edgeAxes[i] == CardinalAxisType.Y) @@ -1085,10 +1092,7 @@ private void AddBoxDisplay() boxDisplay.transform.localScale = 2.0f * currentBoundsExtents; boxDisplay.transform.parent = rigRoot.transform; - if (hideElementsInInspector == true) - { - boxDisplay.hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector; - } + } } @@ -1300,10 +1304,7 @@ private void InitializeDataStructures() { rigRoot = new GameObject(rigRootName).transform; rigRoot.parent = transform; - if (hideElementsInInspector == true) - { - rigRoot.hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector; - } + boundsCorners = new Vector3[8]; From 985c4ecb9b6eb2f7e44afa1adb386d5aa26774a3 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 11:45:54 -0700 Subject: [PATCH 69/96] Fix nullpointer --- .../Features/UX/Scripts/BoundingBox/BoundingBox.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index c06647fd002..88fe71638c3 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -508,9 +508,12 @@ public bool HideElementsInInspector private void UpdateRigVisibilityInInspector() { HideFlags desiredFlags = hideElementsInInspector ? HideFlags.HideInHierarchy | HideFlags.HideInInspector : HideFlags.None; - foreach (var cube in corners) + if (corners != null) { - cube.hideFlags = desiredFlags; + foreach (var cube in corners) + { + cube.hideFlags = desiredFlags; + } } if (boxDisplay != null) @@ -523,9 +526,12 @@ private void UpdateRigVisibilityInInspector() rigRoot.hideFlags = desiredFlags; } - foreach (var link in links) + if (links != null) { - link.hideFlags = desiredFlags; + foreach (var link in links) + { + link.hideFlags = desiredFlags; + } } } From b441ac11fc0eb771dc7b1557d99b103c1f3aaf9f Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 11:59:31 -0700 Subject: [PATCH 70/96] Fix grabbed material red --- .../UX/BoundingBox/Scripts/BoundingBoxTest.cs | 10 ++++++---- .../UX/Scripts/BoundingBox/BoundingBox.cs | 17 ++++++++++++----- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index 5002b1ef50b..b001a9ddbf9 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -101,12 +101,14 @@ private IEnumerator Sequence() bbox.BoxMaterial = LoadAsset("MRTK_Standard_Cyan"); yield return WaitForSpeechCommand(); - SetStatus("BBox material none"); - bbox.BoxMaterial = null; + SetStatus("BBox grabbed material red"); + bbox.BoxGrabbedMaterial = LoadAsset("MRTK_Standard_Red"); + mh.OnManipulationStarted.AddListener((med) => bbox.HighlightWires()); + mh.OnManipulationEnded.AddListener((med) => bbox.UnhighlightWires()); yield return WaitForSpeechCommand(); - SetStatus("BBox grabbed material green"); - bbox.BoxGrabbedMaterial = LoadAsset("MRTK_Standard_Emerald"); + SetStatus("BBox material none"); + bbox.BoxMaterial = null; yield return WaitForSpeechCommand(); SetStatus("Wireframe radius 0.1"); diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index 88fe71638c3..d4ffa5db6c9 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -209,7 +209,14 @@ public Material BoxMaterial public Material BoxGrabbedMaterial { get { return boxGrabbedMaterial; } - set { boxGrabbedMaterial = value; } + set + { + if (boxGrabbedMaterial != value) + { + boxGrabbedMaterial = value; + CreateRig(); + } + } } [SerializeField] @@ -513,7 +520,7 @@ private void UpdateRigVisibilityInInspector() foreach (var cube in corners) { cube.hideFlags = desiredFlags; - } + } } if (boxDisplay != null) @@ -531,7 +538,7 @@ private void UpdateRigVisibilityInInspector() foreach (var link in links) { link.hideFlags = desiredFlags; - } + } } } @@ -585,7 +592,7 @@ private void UpdateRigVisibilityInInspector() // Current position of the grab point private Vector3 currentGrabPoint; - + // Scale of the target at startup (in Start()) private Vector3 initialScaleAtStart; private Vector3 maximumScale; @@ -1143,7 +1150,7 @@ private Bounds GetTargetBounds() int targetChildCount = 0; for (int i = 0; i < Target.transform.childCount; i++) { - if(!Target.transform.GetChild(i).name.Equals(rigRootName)) + if (!Target.transform.GetChild(i).name.Equals(rigRootName)) { targetChildCount++; } From 042376e6d4042a3471642493cf3b62a2143369d8 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 14:08:27 -0700 Subject: [PATCH 71/96] Bounding box around many children is working,, but only if I comment out first half of tests. --- .../UX/BoundingBox/Scripts/BoundingBoxTest.cs | 3 +- .../UX/Scripts/BoundingBox/BoundingBox.cs | 38 ++++++++++++++----- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index b001a9ddbf9..d7717029208 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -55,7 +55,7 @@ private IEnumerator Sequence() SetStatus("HideElementsInInspector true"); bbox.HideElementsInInspector = true; yield return WaitForSpeechCommand(); - + SetStatus("HideElementsInInspector false"); bbox.HideElementsInInspector = false; yield return WaitForSpeechCommand(); @@ -142,6 +142,7 @@ private IEnumerator Sequence() bbox.BoundingBoxActivation = BoundingBox.BoundingBoxActivationType.ActivateOnStart; bbox.HideElementsInInspector = false; multiRoot.AddComponent(); + yield return WaitForSpeechCommand(); } } diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index d4ffa5db6c9..4eab9e9b5da 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -1,6 +1,7 @@ // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Input; +using Microsoft.MixedReality.Toolkit.Utilities; using System; using System.Collections.Generic; using UnityEngine; @@ -1131,8 +1132,14 @@ private void SetBoundingBoxCollider() } else if (boundsMethod == BoundsCalculationMethod.Colliders) { - cachedTargetCollider.center = bounds.center; - cachedTargetCollider.size = bounds.size; + // bounds.center is in world space, but cachedTargetCollider.center is in local space + cachedTargetCollider.center = Target.transform.InverseTransformPoint(bounds.center); + cachedTargetCollider.size = Target.transform.InverseTransformSize(bounds.size); + DebugUtilities.DrawPoint(bounds.center, Color.cyan); + + DebugUtilities.DrawPoint(bounds.min, Color.red); + DebugUtilities.DrawPoint(bounds.max, Color.green); + Debug.LogError("Error pause"); } } @@ -1147,15 +1154,16 @@ private Bounds GetTargetBounds() { Bounds bounds = new Bounds(); - int targetChildCount = 0; + List toExplore = new List(); for (int i = 0; i < Target.transform.childCount; i++) { - if (!Target.transform.GetChild(i).name.Equals(rigRootName)) + Transform child = Target.transform.GetChild(i); + if (!child.name.Equals(rigRootName)) { - targetChildCount++; + toExplore.Add(child); } } - if (targetChildCount == 0) + if (toExplore.Count == 0) { bounds = GetSingleObjectBounds(Target); boundsMethod = BoundsCalculationMethod.Collider; @@ -1163,15 +1171,19 @@ private Bounds GetTargetBounds() } else { - for (int i = 0; i < Target.transform.childCount; ++i) + for (int i = 0; i < toExplore.Count; i++) { + var current = toExplore[i]; + if (bounds.size == Vector3.zero) { - bounds = GetSingleObjectBounds(Target.transform.GetChild(i).gameObject); + bounds = GetSingleObjectBounds(current.gameObject); + DebugDrawObjectBounds(bounds); } else { - Bounds childBounds = GetSingleObjectBounds(Target.transform.GetChild(i).gameObject); + Bounds childBounds = GetSingleObjectBounds(current.gameObject); + DebugDrawObjectBounds(childBounds); if (childBounds.size != Vector3.zero) { bounds.Encapsulate(childBounds); @@ -1255,6 +1267,14 @@ private Bounds GetTargetBounds() boundsMethod = BoundsCalculationMethod.Collider; return bounds; } + + private void DebugDrawObjectBounds(Bounds bounds) + { + DebugUtilities.DrawPoint(bounds.min, Color.magenta); + DebugUtilities.DrawPoint(bounds.max, Color.yellow); + + } + private Bounds GetSingleObjectBounds(GameObject gameObject) { Bounds bounds = new Bounds(Vector3.zero, Vector3.zero); From 40fe81845274d954145af579c9574db3825608c0 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 14:35:15 -0700 Subject: [PATCH 72/96] Fix bounds being incorrect when bunch of objects are added in middle of game --- .../UX/BoundingBox/Scripts/BoundingBoxTest.cs | 21 ++++++---- .../UX/Scripts/BoundingBox/BoundingBox.cs | 39 +++++++------------ .../Utilities/DebugUtilities.cs | 12 ++++++ 3 files changed, 40 insertions(+), 32 deletions(-) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index d7717029208..b1459cb36fa 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -3,6 +3,7 @@ using Microsoft.MixedReality.Toolkit.Input; using Microsoft.MixedReality.Toolkit.UI; +using Microsoft.MixedReality.Toolkit.Utilities; using System.Collections; using System.Collections.Generic; using System.Text; @@ -40,6 +41,7 @@ private void SetStatus(string status) private IEnumerator Sequence() { + { var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); cube.GetComponent().material = LoadAsset("MRTK_Standard_DarkGray"); @@ -123,7 +125,6 @@ private IEnumerator Sequence() } { - SetStatus("Many children"); GameObject multiRoot = new GameObject(); @@ -132,20 +133,24 @@ private IEnumerator Sequence() int numCubes = 10; for (int i = 0; i < numCubes; i++) { - var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); - cube.transform.localScale = Vector3.one * 0.1f; - cube.transform.parent = multiRoot.transform; - cube.transform.localPosition = Random.insideUnitSphere; - cube.transform.rotation = Quaternion.Euler(Random.insideUnitSphere * 360f); + var cubechild = GameObject.CreatePrimitive(PrimitiveType.Cube); + cubechild.transform.localScale = Vector3.one * 0.1f; + cubechild.transform.parent = multiRoot.transform; + cubechild.transform.localPosition = Random.insideUnitSphere; + cubechild.transform.rotation = Quaternion.Euler(Random.insideUnitSphere * 360f); } - var bbox = multiRoot.AddComponent(); + bbox = multiRoot.AddComponent(); bbox.BoundingBoxActivation = BoundingBox.BoundingBoxActivationType.ActivateOnStart; bbox.HideElementsInInspector = false; multiRoot.AddComponent(); yield return WaitForSpeechCommand(); } } - + private void DebugDrawObjectBounds(Bounds bounds) + { + DebugUtilities.DrawPoint(bounds.min, Color.magenta); + DebugUtilities.DrawPoint(bounds.max, Color.yellow); + } private T LoadAsset(string s) where T : UnityEngine.Object { string[] paths = AssetDatabase.FindAssets(s); diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index 4eab9e9b5da..d124659a1df 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -1112,6 +1112,9 @@ private void AddBoxDisplay() private void SetBoundingBoxCollider() { + // Make sure that the bounds of all child objects are up to date before we compute bounds + UnityEngine.Physics.SyncTransforms(); + //Collider.bounds is world space bounding volume. //Mesh.bounds is local space bounding volume //Renderer.bounds is the same as mesh.bounds but in world space coords @@ -1135,11 +1138,6 @@ private void SetBoundingBoxCollider() // bounds.center is in world space, but cachedTargetCollider.center is in local space cachedTargetCollider.center = Target.transform.InverseTransformPoint(bounds.center); cachedTargetCollider.size = Target.transform.InverseTransformSize(bounds.size); - DebugUtilities.DrawPoint(bounds.center, Color.cyan); - - DebugUtilities.DrawPoint(bounds.min, Color.red); - DebugUtilities.DrawPoint(bounds.max, Color.green); - Debug.LogError("Error pause"); } } @@ -1154,16 +1152,15 @@ private Bounds GetTargetBounds() { Bounds bounds = new Bounds(); - List toExplore = new List(); + int targetChildCount = 0; for (int i = 0; i < Target.transform.childCount; i++) { - Transform child = Target.transform.GetChild(i); - if (!child.name.Equals(rigRootName)) + if (!Target.transform.GetChild(i).name.Equals(rigRootName)) { - toExplore.Add(child); + targetChildCount++; } } - if (toExplore.Count == 0) + if (targetChildCount == 0) { bounds = GetSingleObjectBounds(Target); boundsMethod = BoundsCalculationMethod.Collider; @@ -1171,19 +1168,19 @@ private Bounds GetTargetBounds() } else { - for (int i = 0; i < toExplore.Count; i++) + for (int i = 0; i < Target.transform.childCount; ++i) { - var current = toExplore[i]; - + if(Target.transform.GetChild(i).name.Equals(rigRootName)) + { + continue; + } if (bounds.size == Vector3.zero) { - bounds = GetSingleObjectBounds(current.gameObject); - DebugDrawObjectBounds(bounds); + bounds = GetSingleObjectBounds(Target.transform.GetChild(i).gameObject); } else { - Bounds childBounds = GetSingleObjectBounds(current.gameObject); - DebugDrawObjectBounds(childBounds); + Bounds childBounds = GetSingleObjectBounds(Target.transform.GetChild(i).gameObject); if (childBounds.size != Vector3.zero) { bounds.Encapsulate(childBounds); @@ -1268,13 +1265,6 @@ private Bounds GetTargetBounds() return bounds; } - private void DebugDrawObjectBounds(Bounds bounds) - { - DebugUtilities.DrawPoint(bounds.min, Color.magenta); - DebugUtilities.DrawPoint(bounds.max, Color.yellow); - - } - private Bounds GetSingleObjectBounds(GameObject gameObject) { Bounds bounds = new Bounds(Vector3.zero, Vector3.zero); @@ -1551,6 +1541,7 @@ private void SetHighlighted(Transform activeHandle) private void UpdateBounds() { + if (cachedTargetCollider != null) { // Store current rotation then zero out the rotation so that the bounds diff --git a/Assets/MixedRealityToolkit/Utilities/DebugUtilities.cs b/Assets/MixedRealityToolkit/Utilities/DebugUtilities.cs index b49b2057b61..e5978065de5 100644 --- a/Assets/MixedRealityToolkit/Utilities/DebugUtilities.cs +++ b/Assets/MixedRealityToolkit/Utilities/DebugUtilities.cs @@ -75,5 +75,17 @@ public static void DrawPoint(Vector3 point, Quaternion rotation, Color color, fl Debug.DrawLine(a, b, color); } } + + /// + /// Draws the minimum and maximum points of the given bounds + /// + /// + /// + /// + public static void DrawBounds(Bounds bounds, Color minColor, Color maxColor) + { + DrawPoint(bounds.min, minColor); + DrawPoint(bounds.max, maxColor); + } } } \ No newline at end of file From 3ccbc359ddc1cfd9fce73c2a4bbe599bc88605f7 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 14:42:14 -0700 Subject: [PATCH 73/96] Clean up logic of filtering out bounding box rig in computing object bounds --- .../UX/Scripts/BoundingBox/BoundingBox.cs | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index d124659a1df..f3d3a2b2961 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -1152,15 +1152,16 @@ private Bounds GetTargetBounds() { Bounds bounds = new Bounds(); - int targetChildCount = 0; + List toExplore = new List(); for (int i = 0; i < Target.transform.childCount; i++) { - if (!Target.transform.GetChild(i).name.Equals(rigRootName)) + var child = Target.transform.GetChild(i); + if (!child.name.Equals(rigRootName)) { - targetChildCount++; + toExplore.Add(child); } } - if (targetChildCount == 0) + if (toExplore.Count == 0) { bounds = GetSingleObjectBounds(Target); boundsMethod = BoundsCalculationMethod.Collider; @@ -1168,19 +1169,16 @@ private Bounds GetTargetBounds() } else { - for (int i = 0; i < Target.transform.childCount; ++i) + for (int i = 0; i < toExplore.Count; ++i) { - if(Target.transform.GetChild(i).name.Equals(rigRootName)) - { - continue; - } + var child = toExplore[i]; if (bounds.size == Vector3.zero) { - bounds = GetSingleObjectBounds(Target.transform.GetChild(i).gameObject); + bounds = GetSingleObjectBounds(child.gameObject); } else { - Bounds childBounds = GetSingleObjectBounds(Target.transform.GetChild(i).gameObject); + Bounds childBounds = GetSingleObjectBounds(child.gameObject); if (childBounds.size != Vector3.zero) { bounds.Encapsulate(childBounds); From bcb7ca755c4062c2d416211fa6972d3182c27df4 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 14:56:29 -0700 Subject: [PATCH 74/96] Fix copyright --- .../Features/UX/Scripts/BoundingBox/BoundingBox.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index f3d3a2b2961..b7bc523bd00 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -1,4 +1,5 @@ -// Licensed under the MIT License. See LICENSE in the project root for license information. +// 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 Microsoft.MixedReality.Toolkit.Utilities; From b1eb7227a2b241e5defb5bb16074ac5c5f7bafe1 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Thu, 23 May 2019 16:48:24 -0700 Subject: [PATCH 75/96] Add check that we actually received boundary points --- .../BoundarySystem/MixedRealityBoundarySystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit.Services/BoundarySystem/MixedRealityBoundarySystem.cs b/Assets/MixedRealityToolkit.Services/BoundarySystem/MixedRealityBoundarySystem.cs index 04804ae106e..5f658ae596d 100644 --- a/Assets/MixedRealityToolkit.Services/BoundarySystem/MixedRealityBoundarySystem.cs +++ b/Assets/MixedRealityToolkit.Services/BoundarySystem/MixedRealityBoundarySystem.cs @@ -906,7 +906,7 @@ private void CalculateBoundaryBounds() var boundaryGeometry = new List(0); var boundaryEdges = new List(0); - if (UnityBoundary.TryGetGeometry(boundaryGeometry, UnityBoundary.Type.TrackedArea)) + if (UnityBoundary.TryGetGeometry(boundaryGeometry, UnityBoundary.Type.TrackedArea) && boundaryGeometry.Count > 0) { // FloorHeight starts out as null. Use a suitably high value for the floor to ensure // that we do not accidentally set it too low. From 57649fa969debf9d231cba05058404ae4b18aca7 Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Thu, 23 May 2019 18:12:48 -0700 Subject: [PATCH 76/96] Update create scenes method calls in editor tests --- .../InputSystem/GazePointerStateMachineTests.cs | 6 +++--- .../PlayModeTests/InteractableTests.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs index df54e2d9375..c02a429f620 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs @@ -56,7 +56,7 @@ public void TestHeadGazeHandAndSpeechBehaviour() [Test] public void TestEyeGazeHandAndSpeechBehaviour() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); // Initial state: gaze pointer active var gsm = new GazePointerVisibilityStateMachine(); @@ -88,7 +88,7 @@ public void TestEyeGazeHandAndSpeechBehaviour() [Test] public void TestEyeGazeToHeadGazeTransition() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); // Initial state: gaze pointer active var gsm = new GazePointerVisibilityStateMachine(); @@ -125,7 +125,7 @@ public void TestEyeGazeToHeadGazeTransition() [Test] public void TestHeadGazeToEyeGazeTransition() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); // Initial state: gaze pointer active var gsm = new GazePointerVisibilityStateMachine(); diff --git a/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs b/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs index 2a7708b0c0f..9000790386d 100644 --- a/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs +++ b/Assets/MixedRealityToolkit.Tests/PlayModeTests/InteractableTests.cs @@ -25,7 +25,7 @@ class InteractableTests [UnityTest] public IEnumerator TestAddInteractableAtRuntime() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); TestUtilities.InitializePlayspace(); var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); From f01abb836568ee55c6653de641feaf54f8a0a8ef Mon Sep 17 00:00:00 2001 From: Lars Simkins Date: Thu, 23 May 2019 18:13:36 -0700 Subject: [PATCH 77/96] Update GazePointerStateMachineTests.cs --- .../EditModeTests/InputSystem/GazePointerStateMachineTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs index 3f2966be745..82bddd304e7 100644 --- a/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs +++ b/Assets/MixedRealityToolkit.Tests/EditModeTests/InputSystem/GazePointerStateMachineTests.cs @@ -60,7 +60,7 @@ public void TestHeadGazeHandAndSpeechBehaviour() /// public void TestHeadGazeHoloLens1GGV() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); // Initial state: gaze pointer active var gsm = new GazePointerVisibilityStateMachine(); @@ -86,7 +86,7 @@ public void TestHeadGazeHoloLens1GGV() /// public void TestHeadGazeGGVArticulatedHands() { - TestUtilities.InitializeMixedRealityToolkitScene(true); + TestUtilities.InitializeMixedRealityToolkitAndCreateScenes(true); // Initial state: gaze pointer active var gsm = new GazePointerVisibilityStateMachine(); From 9973a1798ee325eb84b923df17e1405760944c96 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 21:54:08 -0700 Subject: [PATCH 78/96] Fix UWP compile error --- .../UX/BoundingBox/Scripts/BoundingBoxTest.cs | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index b1459cb36fa..9736493b558 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -7,13 +7,21 @@ using System.Collections; using System.Collections.Generic; using System.Text; +#if UNITY_EDITOR using UnityEditor; +#endif using UnityEngine; public class BoundingBoxTest : InputSystemGlobalListener, IMixedRealitySpeechHandler { - [SerializeField] - private TextMesh statusText; + + public TextMesh statusText; + + public Material darkGrayMaterial; + public Material redMaterial; + public Material cyanMaterial; + + public GameObject scaleWidget; private bool speechTriggeredFalg; private Vector3 cubePosition = new Vector3(0, 0, 2); @@ -44,7 +52,8 @@ private IEnumerator Sequence() { var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); - cube.GetComponent().material = LoadAsset("MRTK_Standard_DarkGray"); + Debug.Assert(darkGrayMaterial != null); + cube.GetComponent().material = darkGrayMaterial; cube.transform.position = cubePosition; SetStatus("Instantiate BoundingBox"); @@ -91,20 +100,22 @@ private IEnumerator Sequence() yield return WaitForSpeechCommand(); SetStatus("Set scale handle widget prefab"); - bbox.ScaleHandleSize = 0.03f; - bbox.ScaleHandlePrefab = LoadAsset("MRTK_BoundingBox_ScaleWidget"); + bbox.ScaleHandleSize = 0.3f; + Debug.Assert(scaleWidget != null); + bbox.ScaleHandlePrefab = scaleWidget; yield return WaitForSpeechCommand(); SetStatus("Handles red"); - bbox.HandleMaterial = LoadAsset("MRTK_Standard_Red"); + bbox.HandleMaterial = redMaterial; yield return WaitForSpeechCommand(); SetStatus("BBox material cyan"); - bbox.BoxMaterial = LoadAsset("MRTK_Standard_Cyan"); + Debug.Assert(cyanMaterial != null); + bbox.BoxMaterial = cyanMaterial; yield return WaitForSpeechCommand(); SetStatus("BBox grabbed material red"); - bbox.BoxGrabbedMaterial = LoadAsset("MRTK_Standard_Red"); + bbox.BoxGrabbedMaterial = redMaterial; mh.OnManipulationStarted.AddListener((med) => bbox.HighlightWires()); mh.OnManipulationEnded.AddListener((med) => bbox.UnhighlightWires()); yield return WaitForSpeechCommand(); @@ -151,12 +162,6 @@ private void DebugDrawObjectBounds(Bounds bounds) DebugUtilities.DrawPoint(bounds.min, Color.magenta); DebugUtilities.DrawPoint(bounds.max, Color.yellow); } - private T LoadAsset(string s) where T : UnityEngine.Object - { - string[] paths = AssetDatabase.FindAssets(s); - var result = (T)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(paths[0]), typeof(T)); - return result; - } private IEnumerator WaitForSpeechCommand() { From 3eaf21184b14fdb819953c6fee6235fad3d33672 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 21:54:39 -0700 Subject: [PATCH 79/96] Fix scalehandlesize not applied when using a custom corner prefab --- .../UX/Scripts/BoundingBox/BoundingBox.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index b7bc523bd00..d14fcc2159a 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -945,6 +945,12 @@ private void AddCorners() GameObject cornerVisuals = Instantiate(isFlattened ? scaleHandleSlatePrefab : scaleHandlePrefab, visualsScale.transform); cornerVisuals.name = "visuals"; + // this is the size of the corner visuals + var cornerbounds = GetMaxBounds(cornerVisuals); + // we need to multiply by this amount to get to desired scale handle size + var invScale = scaleHandleSize / cornerbounds.size.x; + cornerVisuals.transform.localScale = new Vector3(invScale, invScale, invScale); + if (isFlattened) { // Rotate 2D slate handle asset for proper orientation @@ -959,6 +965,16 @@ private void AddCorners() } } + private Bounds GetMaxBounds(GameObject g) + { + var b = new Bounds(g.transform.position, Vector3.zero); + foreach (Renderer r in g.GetComponentsInChildren()) + { + b.Encapsulate(r.bounds); + } + return b; + } + private void AddLinks() { edgeCenters = new Vector3[12]; From eb3ff7f70681568da78041a7fc96e0ce98b2c3fe Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 21:55:11 -0700 Subject: [PATCH 80/96] Update scalehandlesize in example scenes (they were too large after the fix) --- .../Scenes/HandInteractionExamples.unity | 18 ++++++++--------- .../Scenes/BoundingBoxRuntimeTest.unity | 13 +++++++----- .../StandardAssets/Prefabs/Cheese.prefab | 20 +++++++++---------- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity index 5632f499397..e4bdbe2cbff 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/HandTracking/Scenes/HandInteractionExamples.unity @@ -6574,7 +6574,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23f9be7a3cb53794ead8b55e784b65aa, type: 3} m_Name: m_EditorClassIdentifier: - focusEnabled: 1 targetObject: {fileID: 775880685} boundsOverride: {fileID: 775880687} activation: 3 @@ -6604,6 +6603,7 @@ MonoBehaviour: showRotationHandleForZ: 1 drawTetherWhenManipulating: 1 debugText: {fileID: 0} + hideElementsInInspector: 1 RotateStarted: m_PersistentCalls: m_Calls: @@ -14568,7 +14568,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23f9be7a3cb53794ead8b55e784b65aa, type: 3} m_Name: m_EditorClassIdentifier: - focusEnabled: 1 targetObject: {fileID: 537276352} boundsOverride: {fileID: 537276355} activation: 3 @@ -14598,6 +14597,7 @@ MonoBehaviour: showRotationHandleForZ: 1 drawTetherWhenManipulating: 1 debugText: {fileID: 0} + hideElementsInInspector: 1 RotateStarted: m_PersistentCalls: m_Calls: @@ -14861,7 +14861,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23f9be7a3cb53794ead8b55e784b65aa, type: 3} m_Name: m_EditorClassIdentifier: - focusEnabled: 1 targetObject: {fileID: 1461408770} boundsOverride: {fileID: 1461408773} activation: 4 @@ -14882,7 +14881,7 @@ MonoBehaviour: type: 3} scaleHandleSlatePrefab: {fileID: 1134031327877807717, guid: c45e552a6d92491468c421c35c5dd63d, type: 3} - scaleHandleSize: 0.03 + scaleHandleSize: 0.0175 rotationHandlePrefab: {fileID: 100000, guid: 57c53da2552a8114ab6d68e0cd31b1eb, type: 3} rotationHandleDiameter: 0.035 showScaleHandles: 1 @@ -14891,6 +14890,7 @@ MonoBehaviour: showRotationHandleForZ: 1 drawTetherWhenManipulating: 1 debugText: {fileID: 0} + hideElementsInInspector: 1 RotateStarted: m_PersistentCalls: m_Calls: @@ -15951,7 +15951,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23f9be7a3cb53794ead8b55e784b65aa, type: 3} m_Name: m_EditorClassIdentifier: - focusEnabled: 1 targetObject: {fileID: 1721301730} boundsOverride: {fileID: 1721301735} activation: 0 @@ -15979,6 +15978,7 @@ MonoBehaviour: showRotationHandleForZ: 0 drawTetherWhenManipulating: 1 debugText: {fileID: 0} + hideElementsInInspector: 1 RotateStarted: m_PersistentCalls: m_Calls: @@ -17205,7 +17205,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23f9be7a3cb53794ead8b55e784b65aa, type: 3} m_Name: m_EditorClassIdentifier: - focusEnabled: 1 targetObject: {fileID: 1984437763} boundsOverride: {fileID: 1984437771} activation: 0 @@ -17226,7 +17225,7 @@ MonoBehaviour: type: 3} scaleHandleSlatePrefab: {fileID: 1134031327877807717, guid: c45e552a6d92491468c421c35c5dd63d, type: 3} - scaleHandleSize: 0.04 + scaleHandleSize: 0.0175 rotationHandlePrefab: {fileID: 100000, guid: 57c53da2552a8114ab6d68e0cd31b1eb, type: 3} rotationHandleDiameter: 0.035 showScaleHandles: 1 @@ -17235,6 +17234,7 @@ MonoBehaviour: showRotationHandleForZ: 1 drawTetherWhenManipulating: 1 debugText: {fileID: 0} + hideElementsInInspector: 1 RotateStarted: m_PersistentCalls: m_Calls: @@ -19564,7 +19564,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23f9be7a3cb53794ead8b55e784b65aa, type: 3} m_Name: m_EditorClassIdentifier: - focusEnabled: 1 targetObject: {fileID: 949313838} boundsOverride: {fileID: 949313840} activation: 3 @@ -19585,7 +19584,7 @@ MonoBehaviour: type: 3} scaleHandleSlatePrefab: {fileID: 1134031327877807717, guid: c45e552a6d92491468c421c35c5dd63d, type: 3} - scaleHandleSize: 0.05 + scaleHandleSize: 0.0175 rotationHandlePrefab: {fileID: 100000, guid: 57c53da2552a8114ab6d68e0cd31b1eb, type: 3} rotationHandleDiameter: 0.05 showScaleHandles: 1 @@ -19594,6 +19593,7 @@ MonoBehaviour: showRotationHandleForZ: 1 drawTetherWhenManipulating: 1 debugText: {fileID: 0} + hideElementsInInspector: 1 RotateStarted: m_PersistentCalls: m_Calls: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity index 82436df25b3..1519381884a 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity @@ -1078,7 +1078,6 @@ Transform: m_Children: - {fileID: 1801423600} - {fileID: 442498766} - - {fileID: 1993683264} m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1349,12 +1348,12 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1993683263} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 1787100464} - m_RootOrder: 2 + m_Father: {fileID: 0} + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1993683265 MonoBehaviour: @@ -1369,6 +1368,10 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: statusText: {fileID: 442498767} + darkGrayMaterial: {fileID: 2100000, guid: f40914b49f8741e39df5b08d3db15497, type: 2} + redMaterial: {fileID: 2100000, guid: c4a1b7475a654dd0acaa0cfdfba2e20c, type: 2} + cyanMaterial: {fileID: 2100000, guid: 53ea63593b32415faf734536616f5fb3, type: 2} + scaleWidget: {fileID: 100002, guid: 40bb9772594a93140a43a9a4f5cf9356, type: 3} --- !u!1 &2051637124 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Cheese.prefab b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Cheese.prefab index d2a533e7ad7..80fb3f1e27b 100644 --- a/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Cheese.prefab +++ b/Assets/MixedRealityToolkit.Examples/StandardAssets/Prefabs/Cheese.prefab @@ -61,7 +61,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23f9be7a3cb53794ead8b55e784b65aa, type: 3} m_Name: m_EditorClassIdentifier: - focusEnabled: 1 targetObject: {fileID: 1976327359951936} boundsOverride: {fileID: 65785153276639906} activation: 1 @@ -82,7 +81,7 @@ MonoBehaviour: type: 3} scaleHandleSlatePrefab: {fileID: 1134031327877807717, guid: c45e552a6d92491468c421c35c5dd63d, type: 3} - scaleHandleSize: 0.04 + scaleHandleSize: 0.0175 rotationHandlePrefab: {fileID: 100000, guid: 57c53da2552a8114ab6d68e0cd31b1eb, type: 3} rotationHandleDiameter: 0.035 showScaleHandles: 1 @@ -91,6 +90,7 @@ MonoBehaviour: showRotationHandleForZ: 0 drawTetherWhenManipulating: 1 debugText: {fileID: 0} + hideElementsInInspector: 1 RotateStarted: m_PersistentCalls: m_Calls: @@ -221,8 +221,8 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 - m_TypeName: Microsoft.MixedReality.Toolkit.SDK.Input.Events.ManipulationEvent, - Microsoft.MixedReality.Toolkit.SDK, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_TypeName: Microsoft.MixedReality.Toolkit.UI.ManipulationEvent, Microsoft.MixedReality.Toolkit.SDK, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null OnManipulationEnded: m_PersistentCalls: m_Calls: @@ -249,18 +249,18 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 - m_TypeName: Microsoft.MixedReality.Toolkit.SDK.Input.Events.ManipulationEvent, - Microsoft.MixedReality.Toolkit.SDK, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_TypeName: Microsoft.MixedReality.Toolkit.UI.ManipulationEvent, Microsoft.MixedReality.Toolkit.SDK, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null OnHoverEntered: m_PersistentCalls: m_Calls: [] - m_TypeName: Microsoft.MixedReality.Toolkit.SDK.Input.Events.ManipulationEvent, - Microsoft.MixedReality.Toolkit.SDK, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_TypeName: Microsoft.MixedReality.Toolkit.UI.ManipulationEvent, Microsoft.MixedReality.Toolkit.SDK, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null OnHoverExited: m_PersistentCalls: m_Calls: [] - m_TypeName: Microsoft.MixedReality.Toolkit.SDK.Input.Events.ManipulationEvent, - Microsoft.MixedReality.Toolkit.SDK, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_TypeName: Microsoft.MixedReality.Toolkit.UI.ManipulationEvent, Microsoft.MixedReality.Toolkit.SDK, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!82 &7184140997535965237 AudioSource: m_ObjectHideFlags: 0 From 968ca587f7103b84c9443764650e8fd577ad105d Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Thu, 23 May 2019 23:34:59 -0700 Subject: [PATCH 81/96] remove unused using UnityEditor --- .../Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index 9736493b558..4813a3f2081 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -5,11 +5,7 @@ using Microsoft.MixedReality.Toolkit.UI; using Microsoft.MixedReality.Toolkit.Utilities; using System.Collections; -using System.Collections.Generic; using System.Text; -#if UNITY_EDITOR -using UnityEditor; -#endif using UnityEngine; public class BoundingBoxTest : InputSystemGlobalListener, IMixedRealitySpeechHandler From bac1bbdac6389dc8aea2838e0316a434def968f0 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Fri, 24 May 2019 00:15:24 -0700 Subject: [PATCH 82/96] Fix regression: select keyword was mapped to the 'a' key instead of the '1' key --- .../Profiles/DefaultMixedRealitySpeechCommandsProfile.asset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset index 695474b3eba..580807d6193 100644 --- a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset +++ b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset @@ -18,7 +18,7 @@ MonoBehaviour: speechCommands: - localizationKey: keyword: Menu - keyCode: 51 + keyCode: 96 action: id: 2 description: Menu From be3c71a0d8e958d033ced2ab287d6d2e6837dddc Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Fri, 24 May 2019 00:21:14 -0700 Subject: [PATCH 83/96] Revert "Fix regression: select keyword was mapped to the 'a' key instead of the '1' key" This reverts commit bac1bbdac6389dc8aea2838e0316a434def968f0. --- .../Profiles/DefaultMixedRealitySpeechCommandsProfile.asset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset index 580807d6193..695474b3eba 100644 --- a/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset +++ b/Assets/MixedRealityToolkit.SDK/Profiles/DefaultMixedRealitySpeechCommandsProfile.asset @@ -18,7 +18,7 @@ MonoBehaviour: speechCommands: - localizationKey: keyword: Menu - keyCode: 96 + keyCode: 51 action: id: 2 description: Menu From 87c6711ab5aba67b7aba38d73698775343b0931c Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Fri, 24 May 2019 10:16:02 -0700 Subject: [PATCH 84/96] static readonly private string --- .../Features/UX/Scripts/BoundingBox/BoundingBox.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index d14fcc2159a..06f2972a596 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -655,7 +655,7 @@ public BoxCollider TargetBounds // True if this game object is a child of the Target one private bool isChildOfTarget = false; - private readonly string rigRootName = "rigRoot"; + private static readonly string rigRootName = "rigRoot"; #endregion Private Properties From f234c963747ff1f44635d1dce574ecba723599c6 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Fri, 24 May 2019 10:20:43 -0700 Subject: [PATCH 85/96] Fix incorrect bounds computation. --- .../Features/UX/Scripts/BoundingBox/BoundingBox.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs index 06f2972a596..16201a5e9ee 100644 --- a/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs +++ b/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs @@ -967,10 +967,17 @@ private void AddCorners() private Bounds GetMaxBounds(GameObject g) { - var b = new Bounds(g.transform.position, Vector3.zero); + var b = new Bounds(); foreach (Renderer r in g.GetComponentsInChildren()) { - b.Encapsulate(r.bounds); + if (b.size == Vector3.zero) + { + b = r.bounds; + } + else + { + b.Encapsulate(r.bounds); + } } return b; } From 400061da5e3dd24eeb228fbd00dd5ecd7e6c9f72 Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Fri, 24 May 2019 10:20:55 -0700 Subject: [PATCH 86/96] Rename BoundingBoxTest to BoundingBoxRuntimeExample --- ...undingBoxRuntimeTest.unity => BoundingBoxRuntimeExample.unity} | 0 ...untimeTest.unity.meta => BoundingBoxRuntimeExample.unity.meta} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/{BoundingBoxRuntimeTest.unity => BoundingBoxRuntimeExample.unity} (100%) rename Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/{BoundingBoxRuntimeTest.unity.meta => BoundingBoxRuntimeExample.unity.meta} (100%) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeExample.unity similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity rename to Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeExample.unity diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeExample.unity.meta similarity index 100% rename from Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeTest.unity.meta rename to Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scenes/BoundingBoxRuntimeExample.unity.meta From 8bc5e64c3212544d21675eaf7937d5f1d14e8a73 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Fri, 24 May 2019 11:20:55 -0700 Subject: [PATCH 87/96] Add error to InscribedRectangle --- .../Definitions/BoundarySystem/InscribedRectangle.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/MixedRealityToolkit/Definitions/BoundarySystem/InscribedRectangle.cs b/Assets/MixedRealityToolkit/Definitions/BoundarySystem/InscribedRectangle.cs index 5f5b53909c1..eb412b1a8da 100644 --- a/Assets/MixedRealityToolkit/Definitions/BoundarySystem/InscribedRectangle.cs +++ b/Assets/MixedRealityToolkit/Definitions/BoundarySystem/InscribedRectangle.cs @@ -85,6 +85,12 @@ public class InscribedRectangle /// public InscribedRectangle(Edge[] geometryEdges, int randomSeed) { + if (geometryEdges == null || geometryEdges.Length == 0) + { + Debug.LogError("InscribedRectangle requires an array of Edges. You passed in a null or empty array"); + return; + } + // Clear previous rectangle Center = EdgeUtilities.InvalidPoint; Width = 0; From bdf993f78748577fc6b346622d164ca683994a7d Mon Sep 17 00:00:00 2001 From: Kurtis Date: Fri, 24 May 2019 11:22:43 -0700 Subject: [PATCH 88/96] Update InscribedRectangle.cs --- .../Definitions/BoundarySystem/InscribedRectangle.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/MixedRealityToolkit/Definitions/BoundarySystem/InscribedRectangle.cs b/Assets/MixedRealityToolkit/Definitions/BoundarySystem/InscribedRectangle.cs index eb412b1a8da..aafb595f546 100644 --- a/Assets/MixedRealityToolkit/Definitions/BoundarySystem/InscribedRectangle.cs +++ b/Assets/MixedRealityToolkit/Definitions/BoundarySystem/InscribedRectangle.cs @@ -87,7 +87,7 @@ public InscribedRectangle(Edge[] geometryEdges, int randomSeed) { if (geometryEdges == null || geometryEdges.Length == 0) { - Debug.LogError("InscribedRectangle requires an array of Edges. You passed in a null or empty array"); + Debug.LogError("InscribedRectangle requires an array of Edges. You passed in a null or empty array."); return; } From 1fe900319954cdb015dfa2f5cc9f9b221e541a8f Mon Sep 17 00:00:00 2001 From: Kurtis Date: Fri, 24 May 2019 11:47:13 -0700 Subject: [PATCH 89/96] Update common.yml --- pipelines/templates/common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/templates/common.yml b/pipelines/templates/common.yml index 426b0ed6146..0b7c295c6fb 100644 --- a/pipelines/templates/common.yml +++ b/pipelines/templates/common.yml @@ -28,7 +28,7 @@ steps: - powershell: | $AutoMrtkVersion = Get-Date -format "dd.MM.yyyy" .\build.ps1 -Version $AutoMrtkVersion -NoNuget - displayName: 'Build Unity and NuGet packages' + displayName: 'Build Unity packages' - powershell: | Get-ChildItem "." -Filter Build-UnityPackage*.log | From 15932b559d8a51ae48fb06e5e11d36239c899c5a Mon Sep 17 00:00:00 2001 From: Julia Schwarz Date: Fri, 24 May 2019 13:30:27 -0700 Subject: [PATCH 90/96] Clean up status message in bounding box test --- .../Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs index 4813a3f2081..db1f35efe16 100644 --- a/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs +++ b/Assets/MixedRealityToolkit.Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxTest.cs @@ -34,11 +34,7 @@ private void SetStatus(string status) { Debug.Assert(statusText != null, "statusText on BoundingBoxTest should not be null"); StringBuilder b = new StringBuilder(); - b.AppendLine($"Test {status}"); - if (bbox != null) - { - b.AppendLine($"minscale: {bbox.ScaleMinimum} maxscale: {bbox.ScaleMaximum}"); - } + b.AppendLine($"{status}"); b.AppendLine($"Press '1' or say 'select' to continue"); statusText.text = b.ToString(); } @@ -128,7 +124,7 @@ private IEnumerator Sequence() bbox.WireframeShape = BoundingBox.WireframeType.Cylindrical; yield return WaitForSpeechCommand(); - GameObject.Destroy(cube); + Destroy(cube); } { @@ -151,7 +147,11 @@ private IEnumerator Sequence() bbox.HideElementsInInspector = false; multiRoot.AddComponent(); yield return WaitForSpeechCommand(); + + Destroy(multiRoot); } + + SetStatus("Done!"); } private void DebugDrawObjectBounds(Bounds bounds) { From 3722a4ba5a4c79f6683199c7ccb9fadf5fb3dc04 Mon Sep 17 00:00:00 2001 From: yoyo <40645158+Yoyozilla@users.noreply.github.com> Date: Sun, 26 May 2019 22:17:25 -0700 Subject: [PATCH 91/96] Update InputEvents.md --- Documentation/Input/InputEvents.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/Input/InputEvents.md b/Documentation/Input/InputEvents.md index c6992bcfd5d..1ddb7835eef 100644 --- a/Documentation/Input/InputEvents.md +++ b/Documentation/Input/InputEvents.md @@ -1,5 +1,6 @@ # Input Events +## Input event handlers need to be registered to receive events. At the script level you consume input events by implementing one of the event handler interfaces: Handler | Events | Description @@ -17,4 +18,4 @@ Handler | Events | Description 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 +- Derive the script from [`InputSystemGlobalListener`](xref:Microsoft.MixedReality.Toolkit.Input.InputSystemGlobalListener). From 287d585d825ec44b2a787a415f50ab6cebc6cdce Mon Sep 17 00:00:00 2001 From: yoyo <40645158+Yoyozilla@users.noreply.github.com> Date: Sun, 26 May 2019 22:20:59 -0700 Subject: [PATCH 92/96] Update InputEvents.md --- Documentation/Input/InputEvents.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/Input/InputEvents.md b/Documentation/Input/InputEvents.md index 1ddb7835eef..c0ab48f108c 100644 --- a/Documentation/Input/InputEvents.md +++ b/Documentation/Input/InputEvents.md @@ -1,6 +1,10 @@ # Input Events -## Input event handlers need to be registered to receive events. +**Input event handlers need to be registered to receive events.** +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). + At the script level you consume input events by implementing one of the event handler interfaces: Handler | Events | Description @@ -16,6 +20,3 @@ 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, 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). From f19c73cb33e0e47aa3e9a3c2cb62fba51ac730b4 Mon Sep 17 00:00:00 2001 From: Luis Valverde <47451126+luis-valverde-ms@users.noreply.github.com> Date: Mon, 27 May 2019 11:16:26 +0100 Subject: [PATCH 93/96] Formatting changes --- Documentation/Input/InputEvents.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/Input/InputEvents.md b/Documentation/Input/InputEvents.md index c0ab48f108c..9167baae0f7 100644 --- a/Documentation/Input/InputEvents.md +++ b/Documentation/Input/InputEvents.md @@ -1,11 +1,11 @@ # Input Events -**Input event handlers need to be registered to receive events.** -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). +At the script level you consume input events by implementing one of the event handler interfaces shown in the table below. -At the script level you consume input events by implementing one of the event handler interfaces: +> [!IMPORTANT] +> 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). Handler | Events | Description --- | --- | --- From 2910ccd3c7bd8b01f6b919d32d613bb084bae944 Mon Sep 17 00:00:00 2001 From: Luis Valverde <47451126+luis-valverde-ms@users.noreply.github.com> Date: Mon, 27 May 2019 14:08:44 +0100 Subject: [PATCH 94/96] Added input action handler interface to receive action events regardless of the input source (#4475) * WIP * Added input action handler script. Raise action events for input up/down and gesture started/completed. * Documentation and removed uneeded files * Input actions example * Documentation * Moved InputActionUnityEvent to the Input namespace and documented it. * Documentation fix --- .../Demos/Input/Scenes/InputActions.meta | 8 + ...MixedRealityControllerMappingProfile.asset | 3235 +++++++++++++++++ ...RealityControllerMappingProfile.asset.meta | 8 + ...tActions.MixedRealityGesturesProfile.asset | 39 + ...ons.MixedRealityGesturesProfile.asset.meta | 8 + ...ions.MixedRealityInputActionsProfile.asset | 58 + ...MixedRealityInputActionsProfile.asset.meta | 8 + ...s.MixedRealityInputSimulationProfile.asset | 54 + ...edRealityInputSimulationProfile.asset.meta | 8 + ...tions.MixedRealityInputSystemProfile.asset | 88 + ....MixedRealityInputSystemProfile.asset.meta | 8 + ...ns.MixedRealitySpeechCommandsProfile.asset | 39 + ...xedRealitySpeechCommandsProfile.asset.meta | 8 + ...edRealityToolkitConfigurationProfile.asset | 50 + ...lityToolkitConfigurationProfile.asset.meta | 8 + .../InputActions/InputActionsExample.unity | 847 +++++ .../InputActionsExample.unity.meta | 7 + .../Input/Scenes/InputActions/Rotator.cs | 15 + .../Input/Scenes/InputActions/Rotator.cs.meta | 11 + .../Input/Events/InputActionUnityEvent.cs | 13 + .../Events/InputActionUnityEvent.cs.meta | 11 + .../Input/Handlers/InputActionHandler.cs | 57 + .../Input/Handlers/InputActionHandler.cs.meta | 11 + .../InputSystem/MixedRealityInputSystem.cs | 143 +- .../Handlers/IMixedRealityBaseInputHandler.cs | 15 + .../IMixedRealityBaseInputHandler.cs.meta | 11 + .../Handlers/IMixedRealityGestureHandler.cs | 2 +- .../IMixedRealityInputActionHandler.cs | 27 + .../IMixedRealityInputActionHandler.cs.meta | 11 + .../Handlers/IMixedRealityInputHandler.cs | 2 +- .../Handlers/IMixedRealitySpeechHandler.cs | 2 +- 31 files changed, 4804 insertions(+), 8 deletions(-) create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityControllerMappingProfile.asset create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityControllerMappingProfile.asset.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityGesturesProfile.asset create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityGesturesProfile.asset.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputActionsProfile.asset create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputActionsProfile.asset.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSimulationProfile.asset create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSimulationProfile.asset.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSystemProfile.asset create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSystemProfile.asset.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealitySpeechCommandsProfile.asset create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealitySpeechCommandsProfile.asset.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityToolkitConfigurationProfile.asset create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityToolkitConfigurationProfile.asset.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActionsExample.unity create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActionsExample.unity.meta create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/Rotator.cs create mode 100644 Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/Rotator.cs.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/Input/Events/InputActionUnityEvent.cs create mode 100644 Assets/MixedRealityToolkit.SDK/Features/Input/Events/InputActionUnityEvent.cs.meta create mode 100644 Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/InputActionHandler.cs create mode 100644 Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/InputActionHandler.cs.meta create mode 100644 Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityBaseInputHandler.cs create mode 100644 Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityBaseInputHandler.cs.meta create mode 100644 Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputActionHandler.cs create mode 100644 Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputActionHandler.cs.meta diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions.meta b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions.meta new file mode 100644 index 00000000000..9dd147a3a79 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a58f6117a7d7fc7428b06ace4e8f3a4f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityControllerMappingProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityControllerMappingProfile.asset new file mode 100644 index 00000000000..0c51a0dde1f --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityControllerMappingProfile.asset @@ -0,0 +1,3235 @@ +%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: 1a1cf5fd47e548e6a23bdd3ddcc00cf6, type: 3} + m_Name: InputActions.MixedRealityControllerMappingProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + mixedRealityControllerMappingProfiles: + - controllerType: + reference: Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand, + Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality + handedness: 1 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Spatial Grip + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Grab + axisType: 3 + inputType: 13 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Index Finger Pose + axisType: 7 + inputType: 33 + inputAction: + id: 13 + description: Index Finger Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand, + Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality + handedness: 2 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Spatial Grip + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Grab + axisType: 3 + inputType: 13 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Index Finger Pose + axisType: 7 + inputType: 33 + inputAction: + id: 13 + description: Index Finger Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityController, + Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality + handedness: 0 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Spatial Grip + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Grip Press + axisType: 3 + inputType: 13 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Trigger Touch + axisType: 2 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Trigger Press (Select) + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Touchpad Position + axisType: 4 + inputType: 21 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Touchpad Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Touchpad Press + axisType: 2 + inputType: 24 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Menu Press + axisType: 2 + inputType: 27 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: Thumbstick Position + axisType: 4 + inputType: 17 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 11 + description: Thumbstick Press + axisType: 2 + inputType: 18 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityController, + Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality + handedness: 1 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Spatial Grip + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Grip Press + axisType: 3 + inputType: 13 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Trigger Touch + axisType: 2 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Trigger Press (Select) + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Touchpad Position + axisType: 4 + inputType: 21 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Touchpad Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Touchpad Press + axisType: 2 + inputType: 24 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Menu Press + axisType: 2 + inputType: 27 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: Thumbstick Position + axisType: 4 + inputType: 17 + inputAction: + id: 5 + description: Teleport Direction + axisConstraint: 4 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 11 + description: Thumbstick Press + axisType: 2 + inputType: 18 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityController, + Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality + handedness: 2 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Spatial Grip + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Grip Press + axisType: 3 + inputType: 13 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Trigger Touch + axisType: 2 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Trigger Press (Select) + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Touchpad Position + axisType: 4 + inputType: 21 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Touchpad Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Touchpad Press + axisType: 2 + inputType: 24 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Menu Press + axisType: 2 + inputType: 27 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: Thumbstick Position + axisType: 4 + inputType: 17 + inputAction: + id: 5 + description: Teleport Direction + axisConstraint: 4 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 11 + description: Thumbstick Press + axisType: 2 + inputType: 18 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityGGVHand, + Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality + handedness: 1 + interactions: + - id: 0 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Grip Pose + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityGGVHand, + Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality + handedness: 2 + interactions: + - id: 0 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Grip Pose + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.Input.UnityInput.MouseController, + Microsoft.MixedReality.Toolkit + handedness: 7 + interactions: + - id: 0 + description: Spatial Mouse Position + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Mouse Delta Position + axisType: 4 + inputType: 4 + inputAction: + id: 12 + description: Mouse Delta + axisConstraint: 4 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Mouse Scroll Position + axisType: 4 + inputType: 50 + inputAction: + id: 11 + description: Scroll + axisConstraint: 4 + keyCode: 0 + axisCodeX: AXIS_3 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Left Mouse Button + axisType: 2 + inputType: 7 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 323 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Right Mouse Button + axisType: 2 + inputType: 7 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 324 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Mouse Button 2 + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 325 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Mouse Button 3 + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 326 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Mouse Button 4 + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 327 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Mouse Button 5 + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 328 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Mouse Button 6 + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 329 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.Input.UnityInput.UnityTouchController, + Microsoft.MixedReality.Toolkit + handedness: 7 + interactions: + - id: 0 + description: Touch Pointer Delta + axisType: 4 + inputType: 4 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Touch Pointer Position + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Touch Press + axisType: 2 + inputType: 6 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.Input.UnityInput.XboxController, Microsoft.MixedReality.Toolkit + handedness: 0 + interactions: + - id: 0 + description: Left Thumbstick + axisType: 4 + inputType: 17 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_1 + axisCodeY: AXIS_2 + invertXAxis: 0 + invertYAxis: 1 + - id: 1 + description: Left Thumbstick Click + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 338 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Right Thumbstick + axisType: 4 + inputType: 17 + inputAction: + id: 5 + description: Teleport Direction + axisConstraint: 4 + keyCode: 0 + axisCodeX: AXIS_4 + axisCodeY: AXIS_5 + invertXAxis: 0 + invertYAxis: 1 + - id: 3 + description: Right Thumbstick Click + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 339 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: D-Pad + axisType: 4 + inputType: 49 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_6 + axisCodeY: AXIS_7 + invertXAxis: 0 + invertYAxis: 1 + - id: 5 + description: Shared Trigger + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_3 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Left Trigger + axisType: 3 + inputType: 10 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_9 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Right Trigger + axisType: 3 + inputType: 10 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_10 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: View + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 336 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Menu + axisType: 2 + inputType: 7 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 337 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: Left Bumper + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 334 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 11 + description: Right Bumper + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 335 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 12 + description: A + axisType: 2 + inputType: 7 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 330 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 13 + description: B + axisType: 2 + inputType: 7 + inputAction: + id: 14 + description: Rotate + axisConstraint: 2 + keyCode: 331 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 14 + description: X + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 332 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 15 + description: Y + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 333 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.OculusRemoteController, + Microsoft.MixedReality.Toolkit.Providers.OpenVR + handedness: 0 + interactions: + - id: 0 + description: D-Pad Position + axisType: 4 + inputType: 49 + inputAction: + id: 5 + description: Teleport Direction + axisConstraint: 4 + keyCode: 0 + axisCodeX: AXIS_5 + axisCodeY: AXIS_6 + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Button.One + axisType: 2 + inputType: 7 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 330 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Button.Two + axisType: 2 + inputType: 7 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 331 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.OculusTouchController, + Microsoft.MixedReality.Toolkit.Providers.OpenVR + handedness: 1 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Axis1D.PrimaryIndexTrigger + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_9 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Axis1D.PrimaryIndexTrigger Touch + axisType: 2 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 344 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Axis1D.PrimaryIndexTrigger Near Touch + axisType: 2 + inputType: 12 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_13 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Axis1D.PrimaryIndexTrigger Press + axisType: 2 + inputType: 13 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: AXIS_9 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Axis1D.PrimaryHandTrigger Press + axisType: 3 + inputType: 10 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_11 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Axis2D.PrimaryThumbstick + axisType: 4 + inputType: 17 + inputAction: + id: 5 + description: Teleport Direction + axisConstraint: 4 + keyCode: 0 + axisCodeX: AXIS_1 + axisCodeY: AXIS_2 + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Button.PrimaryThumbstick Touch + axisType: 2 + inputType: 19 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 346 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Button.PrimaryThumbstick Near Touch + axisType: 2 + inputType: 31 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_15 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Button.PrimaryThumbstick Press + axisType: 2 + inputType: 18 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 338 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: Button.Three Press + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 332 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 11 + description: Button.Four Press + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 333 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 12 + description: Button.Start Press + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 337 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 13 + description: Button.Three Touch + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 342 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 14 + description: Button.Four Touch + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 343 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 15 + description: Touch.PrimaryThumbRest Touch + axisType: 2 + inputType: 30 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 348 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 16 + description: Touch.PrimaryThumbRest Near Touch + axisType: 2 + inputType: 31 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_17 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.OculusTouchController, + Microsoft.MixedReality.Toolkit.Providers.OpenVR + handedness: 2 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Axis1D.SecondaryIndexTrigger + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_10 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Axis1D.SecondaryIndexTrigger Touch + axisType: 2 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 345 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Axis1D.SecondaryIndexTrigger Near Touch + axisType: 2 + inputType: 12 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_14 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Axis1D.SecondaryIndexTrigger Press + axisType: 2 + inputType: 13 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: AXIS_10 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Axis1D.SecondaryHandTrigger Press + axisType: 3 + inputType: 10 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_12 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Axis2D.SecondaryThumbstick + axisType: 4 + inputType: 17 + inputAction: + id: 5 + description: Teleport Direction + axisConstraint: 4 + keyCode: 0 + axisCodeX: AXIS_4 + axisCodeY: AXIS_5 + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Button.SecondaryThumbstick Touch + axisType: 2 + inputType: 19 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 347 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Button.SecondaryThumbstick Near Touch + axisType: 2 + inputType: 31 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_16 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Button.SecondaryThumbstick Press + axisType: 2 + inputType: 18 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 339 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: Button.One Press + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 330 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 11 + description: Button.Two Press + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 331 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 12 + description: Button.One Touch + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 340 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 13 + description: Button.Two Touch + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 341 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 14 + description: Touch.SecondaryThumbRest Touch + axisType: 2 + inputType: 30 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 349 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 15 + description: Touch.SecondaryThumbRest Near Touch + axisType: 2 + inputType: 31 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_18 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.ViveKnucklesController, + Microsoft.MixedReality.Toolkit.Providers.OpenVR + handedness: 1 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_9 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Trigger Press + axisType: 2 + inputType: 13 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 344 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Trigger Touch + axisType: 2 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_9 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Grip Average + axisType: 3 + inputType: 10 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_11 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Trackpad Position + axisType: 4 + inputType: 21 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_1 + axisCodeY: AXIS_2 + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Trackpad Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 346 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Trackpad Press + axisType: 2 + inputType: 24 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 338 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Inner Face Button + axisType: 2 + inputType: 7 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 332 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Outer Face Button + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 333 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: Index Finger Cap Sensor + axisType: 3 + inputType: 33 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_20 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 11 + description: Middle Finger Cap Sensor + axisType: 3 + inputType: 37 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_22 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 12 + description: Ring Finger Cap Sensor + axisType: 3 + inputType: 41 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_24 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 13 + description: Pinky Finger Cap Sensor + axisType: 3 + inputType: 45 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_26 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.ViveKnucklesController, + Microsoft.MixedReality.Toolkit.Providers.OpenVR + handedness: 2 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_10 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Trigger Press + axisType: 2 + inputType: 13 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 345 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Trigger Touch + axisType: 2 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_10 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Grip Average + axisType: 3 + inputType: 10 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_12 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Trackpad Position + axisType: 4 + inputType: 21 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_4 + axisCodeY: AXIS_5 + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Trackpad Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 347 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Trackpad Press + axisType: 2 + inputType: 24 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 339 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Inner Face Button + axisType: 2 + inputType: 7 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 330 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Outer Face Button + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 331 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: Index Finger Cap Sensor + axisType: 3 + inputType: 33 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_21 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 11 + description: Middle Finger Cap Sensor + axisType: 3 + inputType: 37 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_23 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 12 + description: Ring Finger Cap Sensor + axisType: 3 + inputType: 41 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_25 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 13 + description: Pinky Finger Cap Sensor + axisType: 3 + inputType: 45 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_27 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.ViveWandController, Microsoft.MixedReality.Toolkit.Providers.OpenVR + handedness: 1 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_9 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Trigger Press + axisType: 2 + inputType: 13 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 344 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Trigger Touch + axisType: 2 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_9 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Grip Press + axisType: 3 + inputType: 10 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_11 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Trackpad Position + axisType: 4 + inputType: 21 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_1 + axisCodeY: AXIS_2 + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Trackpad Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 346 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Trackpad Press + axisType: 2 + inputType: 24 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 338 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Menu Button + axisType: 2 + inputType: 7 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 332 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.ViveWandController, Microsoft.MixedReality.Toolkit.Providers.OpenVR + handedness: 2 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_10 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Trigger Press + axisType: 2 + inputType: 13 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 345 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Trigger Touch + axisType: 2 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_10 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Grip Press + axisType: 3 + inputType: 10 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_12 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Trackpad Position + axisType: 4 + inputType: 21 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_4 + axisCodeY: AXIS_5 + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Trackpad Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 347 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Trackpad Press + axisType: 2 + inputType: 24 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 339 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Menu Button + axisType: 2 + inputType: 7 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 330 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.WindowsMixedRealityOpenVRMotionController, + Microsoft.MixedReality.Toolkit.Providers.OpenVR + handedness: 1 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Spatial Grip + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Grip Press + axisType: 3 + inputType: 13 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_11 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_9 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Trigger Touch + axisType: 3 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_9 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Trigger Press (Select) + axisType: 2 + inputType: 13 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 344 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Touchpad Position + axisType: 4 + inputType: 21 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_17 + axisCodeY: AXIS_18 + invertXAxis: 0 + invertYAxis: 1 + - id: 7 + description: Touchpad Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 346 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Touchpad Press + axisType: 2 + inputType: 24 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 338 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Menu Press + axisType: 2 + inputType: 7 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 330 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: Thumbstick Position + axisType: 4 + inputType: 17 + inputAction: + id: 5 + description: Teleport Direction + axisConstraint: 4 + keyCode: 0 + axisCodeX: AXIS_1 + axisCodeY: AXIS_2 + invertXAxis: 0 + invertYAxis: 1 + - id: 11 + description: Thumbstick Press + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 348 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.WindowsMixedRealityOpenVRMotionController, + Microsoft.MixedReality.Toolkit.Providers.OpenVR + handedness: 2 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Spatial Grip + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Grip Press + axisType: 3 + inputType: 7 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_12 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_10 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Trigger Touch + axisType: 3 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_10 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Trigger Press (Select) + axisType: 2 + inputType: 13 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 345 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 6 + description: Touchpad Position + axisType: 4 + inputType: 21 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_19 + axisCodeY: AXIS_20 + invertXAxis: 0 + invertYAxis: 1 + - id: 7 + description: Touchpad Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 347 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Touchpad Press + axisType: 2 + inputType: 24 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 339 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Menu Press + axisType: 2 + inputType: 7 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 332 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: Thumbstick Position + axisType: 4 + inputType: 17 + inputAction: + id: 5 + description: Teleport Direction + axisConstraint: 4 + keyCode: 0 + axisCodeX: AXIS_4 + axisCodeY: AXIS_5 + invertXAxis: 0 + invertYAxis: 1 + - id: 11 + description: Thumbstick Press + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 349 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.Input.SimulatedArticulatedHand, Microsoft.MixedReality.Toolkit.Services.InputSimulation + handedness: 1 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Spatial Grip + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Grab + axisType: 3 + inputType: 13 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Index Finger Pose + axisType: 7 + inputType: 33 + inputAction: + id: 13 + description: Index Finger Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.Input.SimulatedArticulatedHand, Microsoft.MixedReality.Toolkit.Services.InputSimulation + handedness: 2 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Spatial Grip + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Grab + axisType: 3 + inputType: 13 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Index Finger Pose + axisType: 7 + inputType: 33 + inputAction: + id: 13 + description: Index Finger Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.Input.SimulatedGestureHand, Microsoft.MixedReality.Toolkit.Services.InputSimulation + handedness: 1 + interactions: + - id: 0 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Grip Pose + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.Input.SimulatedGestureHand, Microsoft.MixedReality.Toolkit.Services.InputSimulation + handedness: 2 + interactions: + - id: 0 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Grip Pose + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.GenericOpenVRController, + Microsoft.MixedReality.Toolkit.Providers.OpenVR + handedness: 1 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_9 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Trigger Press (Select) + axisType: 2 + inputType: 13 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 344 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Trigger Touch + axisType: 2 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_9 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Grip Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_11 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Trackpad-Thumbstick Position + axisType: 4 + inputType: 21 + inputAction: + id: 5 + description: Teleport Direction + axisConstraint: 4 + keyCode: 0 + axisCodeX: AXIS_1 + axisCodeY: AXIS_2 + invertXAxis: 0 + invertYAxis: 1 + - id: 6 + description: Trackpad-Thumbstick Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 346 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Trackpad-Thumbstick Press + axisType: 2 + inputType: 24 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 338 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Unity Button Id 2 + axisType: 2 + inputType: 7 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 332 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Unity Button Id 3 + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 333 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: WMR Touchpad Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 348 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 11 + description: WMR Touchpad Position + axisType: 4 + inputType: 21 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_17 + axisCodeY: AXIS_18 + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.OpenVR.Input.GenericOpenVRController, + Microsoft.MixedReality.Toolkit.Providers.OpenVR + handedness: 2 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 6 + description: Trigger + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_10 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Trigger Press (Select) + axisType: 2 + inputType: 13 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 345 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Trigger Touch + axisType: 2 + inputType: 11 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_10 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Grip Trigger Position + axisType: 3 + inputType: 10 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: AXIS_12 + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 5 + description: Trackpad-Thumbstick Position + axisType: 4 + inputType: 21 + inputAction: + id: 5 + description: Teleport Direction + axisConstraint: 4 + keyCode: 0 + axisCodeX: AXIS_4 + axisCodeY: AXIS_5 + invertXAxis: 0 + invertYAxis: 1 + - id: 6 + description: Trackpad-Thumbstick Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 347 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 7 + description: Trackpad-Thumbstick Press + axisType: 2 + inputType: 24 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 339 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 8 + description: Unity Button Id 0 + axisType: 2 + inputType: 7 + inputAction: + id: 2 + description: Menu + axisConstraint: 2 + keyCode: 330 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 9 + description: Unity Button Id 1 + axisType: 2 + inputType: 7 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 331 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 10 + description: WMR Touchpad Touch + axisType: 2 + inputType: 22 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 349 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 11 + description: WMR Touchpad Position + axisType: 4 + inputType: 21 + inputAction: + id: 0 + description: None + axisConstraint: 0 + keyCode: 0 + axisCodeX: AXIS_19 + axisCodeY: AXIS_20 + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.Services.InputSimulation.SimulatedArticulatedHand, + Microsoft.MixedReality.Toolkit.Services.InputSimulation + handedness: 1 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Spatial Grip + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Grab + axisType: 3 + inputType: 13 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Index Finger Pose + axisType: 7 + inputType: 33 + inputAction: + id: 13 + description: Index Finger Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.Services.InputSimulation.SimulatedArticulatedHand, + Microsoft.MixedReality.Toolkit.Services.InputSimulation + handedness: 2 + interactions: + - id: 0 + description: Spatial Pointer + axisType: 7 + inputType: 3 + inputAction: + id: 4 + description: Pointer Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Spatial Grip + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 2 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 3 + description: Grab + axisType: 3 + inputType: 13 + inputAction: + id: 7 + description: Grip Press + axisConstraint: 3 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 4 + description: Index Finger Pose + axisType: 7 + inputType: 33 + inputAction: + id: 13 + description: Index Finger Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.Services.InputSimulation.SimulatedGestureHand, + Microsoft.MixedReality.Toolkit.Services.InputSimulation + handedness: 1 + interactions: + - id: 0 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Grip Pose + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - controllerType: + reference: Microsoft.MixedReality.Toolkit.Services.InputSimulation.SimulatedGestureHand, + Microsoft.MixedReality.Toolkit.Services.InputSimulation + handedness: 2 + interactions: + - id: 0 + description: Select + axisType: 2 + inputType: 25 + inputAction: + id: 1 + description: Select + axisConstraint: 2 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 + - id: 1 + description: Grip Pose + axisType: 7 + inputType: 14 + inputAction: + id: 3 + description: Grip Pose + axisConstraint: 7 + keyCode: 0 + axisCodeX: + axisCodeY: + invertXAxis: 0 + invertYAxis: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityControllerMappingProfile.asset.meta b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityControllerMappingProfile.asset.meta new file mode 100644 index 00000000000..69185428ee7 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityControllerMappingProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c876c674d41927a47b6beba1205fd673 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityGesturesProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityGesturesProfile.asset new file mode 100644 index 00000000000..13b88e55dad --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityGesturesProfile.asset @@ -0,0 +1,39 @@ +%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: 7554812f08ec49e694a8d9d4ee235a9c, type: 3} + m_Name: InputActions.MixedRealityGesturesProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + manipulationGestures: 12 + navigationGestures: 112 + useRailsNavigation: 0 + railsNavigationGestures: 896 + windowsGestureAutoStart: 0 + gestures: + - description: Hold + gestureType: 1 + action: + id: 14 + description: Rotate + axisConstraint: 2 + - description: Navigation + gestureType: 2 + action: + id: 10 + description: Navigation Action + axisConstraint: 0 + - description: Manipulation + gestureType: 3 + action: + id: 9 + description: Manipulate Action + axisConstraint: 0 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityGesturesProfile.asset.meta b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityGesturesProfile.asset.meta new file mode 100644 index 00000000000..6285c558d6e --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityGesturesProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9c798b69bfd8a4e458ad6f335c789393 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputActionsProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputActionsProfile.asset new file mode 100644 index 00000000000..dcb4d27cb5c --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputActionsProfile.asset @@ -0,0 +1,58 @@ +%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: d1a15d870c8b4e52acc4643bd258ed6e, type: 3} + m_Name: InputActions.MixedRealityInputActionsProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + inputActions: + - id: 1 + description: Select + axisConstraint: 2 + - id: 2 + description: Menu + axisConstraint: 2 + - id: 3 + description: Grip Pose + axisConstraint: 7 + - id: 4 + description: Pointer Pose + axisConstraint: 7 + - id: 5 + description: Teleport Direction + axisConstraint: 4 + - id: 6 + description: Trigger + axisConstraint: 3 + - id: 7 + description: Grip Press + axisConstraint: 3 + - id: 8 + description: Hold Action + axisConstraint: 0 + - id: 9 + description: Manipulate Action + axisConstraint: 0 + - id: 10 + description: Navigation Action + axisConstraint: 0 + - id: 11 + description: Scroll + axisConstraint: 4 + - id: 12 + description: Mouse Delta + axisConstraint: 4 + - id: 13 + description: Index Finger Pose + axisConstraint: 7 + - id: 14 + description: Rotate + axisConstraint: 2 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputActionsProfile.asset.meta b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputActionsProfile.asset.meta new file mode 100644 index 00000000000..d176c7c099e --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputActionsProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8ffa03c424aa71d41899d49d751798b2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSimulationProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSimulationProfile.asset new file mode 100644 index 00000000000..5e29b8164d1 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSimulationProfile.asset @@ -0,0 +1,54 @@ +%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: 78a4b02a0d9e7044fa19c6d432d0cafa, type: 3} + m_Name: InputActions.MixedRealityInputSimulationProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + isCameraControlEnabled: 1 + extraMouseSensitivityScale: 3 + defaultMouseSensitivity: 0.1 + mouseLookButton: 1 + isControllerLookInverted: 1 + currentControlMode: 0 + fastControlKey: 305 + controlSlowSpeed: 0.1 + controlFastSpeed: 1 + moveHorizontal: Horizontal + moveVertical: Vertical + mouseX: Mouse X + mouseY: Mouse Y + lookHorizontal: AXIS_4 + lookVertical: AXIS_5 + simulateEyePosition: 0 + handSimulationMode: 1 + toggleLeftHandKey: 116 + toggleRightHandKey: 121 + handHideTimeout: 0.2 + leftHandManipulationKey: 304 + rightHandManipulationKey: 32 + defaultHandGesture: 2 + leftMouseHandGesture: 3 + middleMouseHandGesture: 0 + rightMouseHandGesture: 0 + handGestureAnimationSpeed: 8 + holdStartDuration: 0.5 + manipulationStartThreshold: 0.03 + defaultHandDistance: 0.5 + handDepthMultiplier: 0.1 + handJitterAmount: 0 + yawHandCWKey: 101 + yawHandCCWKey: 113 + pitchHandCWKey: 102 + pitchHandCCWKey: 114 + rollHandCWKey: 120 + rollHandCCWKey: 122 + handRotationSpeed: 100 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSimulationProfile.asset.meta b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSimulationProfile.asset.meta new file mode 100644 index 00000000000..529538b24e0 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSimulationProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dbb7d9502608042489e0a90bd8c6e73a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSystemProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSystemProfile.asset new file mode 100644 index 00000000000..3ebecb921ec --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSystemProfile.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: InputActions.MixedRealityInputSystemProfile + 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: dbb7d9502608042489e0a90bd8c6e73a, + type: 2} + focusProviderType: + reference: Microsoft.MixedReality.Toolkit.Input.FocusProvider, Microsoft.MixedReality.Toolkit.Services.InputSystem + inputActionsProfile: {fileID: 11400000, guid: 8ffa03c424aa71d41899d49d751798b2, + type: 2} + inputActionRulesProfile: {fileID: 11400000, guid: 03945385d89102f41855bc8f5116b199, + type: 2} + pointerProfile: {fileID: 11400000, guid: 48aa63a9725047b28d4137fd0834bc31, type: 2} + gesturesProfile: {fileID: 11400000, guid: 9c798b69bfd8a4e458ad6f335c789393, type: 2} + speechCommandsProfile: {fileID: 11400000, guid: 2ffbc6ad24d25a0449cc2959a521db60, + type: 2} + enableControllerMapping: 1 + controllerMappingProfile: {fileID: 11400000, guid: c876c674d41927a47b6beba1205fd673, + type: 2} + controllerVisualizationProfile: {fileID: 11400000, guid: 345c06fdf3732db46b96299bd3cba653, + type: 2} + handTrackingProfile: {fileID: 11400000, guid: 7f1e3cd673742f94ca860ac7ae733024, + type: 2} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSystemProfile.asset.meta b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSystemProfile.asset.meta new file mode 100644 index 00000000000..4f34a35e9f0 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityInputSystemProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 81c9c62668cf84a4692c2ece9adf94de +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealitySpeechCommandsProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealitySpeechCommandsProfile.asset new file mode 100644 index 00000000000..a0a6cc9c720 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealitySpeechCommandsProfile.asset @@ -0,0 +1,39 @@ +%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: InputActions.MixedRealitySpeechCommandsProfile + m_EditorClassIdentifier: + isCustomProfile: 1 + startBehavior: 0 + recognitionConfidenceLevel: 1 + speechCommands: + - localizationKey: + keyword: Menu + keyCode: 51 + action: + id: 2 + description: Menu + axisConstraint: 2 + - localizationKey: + keyword: Select + keyCode: 49 + action: + id: 1 + description: Select + axisConstraint: 2 + - localizationKey: + keyword: Rotate + keyCode: 0 + action: + id: 14 + description: Rotate + axisConstraint: 2 diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealitySpeechCommandsProfile.asset.meta b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealitySpeechCommandsProfile.asset.meta new file mode 100644 index 00000000000..7a423360e3a --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealitySpeechCommandsProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2ffbc6ad24d25a0449cc2959a521db60 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityToolkitConfigurationProfile.asset b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityToolkitConfigurationProfile.asset new file mode 100644 index 00000000000..e84e471aca2 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityToolkitConfigurationProfile.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: InputActions.MixedRealityToolkitConfigurationProfile + 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: 81c9c62668cf84a4692c2ece9adf94de, 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/Input/Scenes/InputActions/InputActions.MixedRealityToolkitConfigurationProfile.asset.meta b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityToolkitConfigurationProfile.asset.meta new file mode 100644 index 00000000000..ee56fd2d8b3 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActions.MixedRealityToolkitConfigurationProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 422765877ea109347930fbf6f8bfa723 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActionsExample.unity b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActionsExample.unity new file mode 100644 index 00000000000..2831569d122 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActionsExample.unity @@ -0,0 +1,847 @@ +%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 &158494117 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 158494119} + - component: {fileID: 158494118} + m_Layer: 0 + m_Name: MixedRealityToolkit + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &158494118 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 158494117} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 83d9acc7968244a8886f3af591305bcb, type: 3} + m_Name: + m_EditorClassIdentifier: + activeProfile: {fileID: 11400000, guid: 422765877ea109347930fbf6f8bfa723, type: 2} +--- !u!4 &158494119 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 158494117} + 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 &564996727 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 564996729} + - component: {fileID: 564996728} + 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 &564996728 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 564996727} + 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 &564996729 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 564996727} + 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 &952463250 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 952463251} + - component: {fileID: 952463256} + - component: {fileID: 952463255} + - component: {fileID: 952463254} + - component: {fileID: 952463253} + - component: {fileID: 952463252} + 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 &952463251 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 952463250} + 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: 1044514467} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &952463252 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 952463250} + 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 + useEyeTracking: 0 +--- !u!114 &952463253 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 952463250} + 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 &952463254 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 952463250} + 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 &952463255 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 952463250} + m_Enabled: 1 +--- !u!20 &952463256 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 952463250} + 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 &1044514466 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1044514467} + m_Layer: 0 + m_Name: MixedRealityPlayspace + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1044514467 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1044514466} + 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: 952463251} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1278718057 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1951033628531078, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_Name + value: SceneDescriptionPanel (1) + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.65 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalPosition.y + value: -0.128 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalPosition.z + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114995780653097258, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_Text + value: 'We created custom Mixed Reality Toolkit Configuration, Input System + and Input Actions profiles cloning the default ones. In the new Input Action + profile, we added a new input action named ''Rotate'' of ''Digital'' type, + meaning that it maps to on/off inputs. + + + + For the Xbox controller button, we cloned the default Controller Mapping profile + and edited the controller entry selecting ''Rotate'' as the action for the + B button. + + + For the speech command, we cloned the default Speech Commands profile and + added a new speech command with the keyword ''Rotate'' mapped to the Rotate + action. + + + For the gesture, we cloned the default Gestures profile and changed the action + for the Hold gesture to ''Rotate''. To use in-editor gesture simulation, we + cloned the default Input Simulation profile and set the Hand Simulation Mode + to ''Gestures''. + + + + We added an InputActionHandler script to the Rotatable object, selected ''Rotate'' + as the input action to handle and hooked up the Action Ended event to the + Rotate() method in the Rotator script.' + objectReference: {fileID: 0} + - target: {fileID: 224802402503016246, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0.06 + objectReference: {fileID: 0} + - target: {fileID: 224849082003076088, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0.321 + objectReference: {fileID: 0} + - target: {fileID: 224745427211728820, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0.197 + objectReference: {fileID: 0} + - target: {fileID: 224963507392718102, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -0.089 + objectReference: {fileID: 0} + - target: {fileID: 1986327371563880, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1112110465771732, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1868906257914926, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114186135864427680, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_Text + value: Handling the action + objectReference: {fileID: 0} + - target: {fileID: 114121190672569774, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_Text + value: Mapping the action to inputs + objectReference: {fileID: 0} + - target: {fileID: 114125765304321574, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_Text + value: Creating the input action + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} +--- !u!1 &1366217491 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1366217495} + - component: {fileID: 1366217494} + - component: {fileID: 1366217493} + - component: {fileID: 1366217492} + - component: {fileID: 1366217497} + - component: {fileID: 1366217496} + m_Layer: 0 + m_Name: Rotatable + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1366217492 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366217491} + 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!23 &1366217493 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366217491} + 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: 71d471797c0e430783230146721c3fcb, 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 &1366217494 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366217491} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1366217495 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366217491} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 2} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1366217496 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366217491} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 19fe7721a0743104baae38e46537705b, type: 3} + m_Name: + m_EditorClassIdentifier: + isFocusRequired: 1 + InputAction: + id: 14 + description: Rotate + axisConstraint: 2 + MarkEventsAsUsed: 0 + OnInputActionStarted: + m_PersistentCalls: + m_Calls: [] + m_TypeName: Microsoft.MixedReality.Toolkit.Input.InputActionHandler+InputActionUnityEvent, + Microsoft.MixedReality.Toolkit.SDK, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + OnInputActionEnded: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1366217497} + m_MethodName: Rotate + 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: Microsoft.MixedReality.Toolkit.Input.InputActionHandler+InputActionUnityEvent, + Microsoft.MixedReality.Toolkit.SDK, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null +--- !u!114 &1366217497 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366217491} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6146f966d8bc21341b1f867dec39f0d1, type: 3} + m_Name: + m_EditorClassIdentifier: + angle: 45 +--- !u!1 &1562830202 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1562830204} + - component: {fileID: 1562830203} + m_Layer: 0 + m_Name: AsyncCoroutineRunner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1562830203 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1562830202} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8e6ecbbf0b5840b09d7b4ee7f0a62b7a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1562830204 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1562830202} + 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: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &2033690595 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1951033628531078, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_Name + value: SceneDescriptionPanel + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalPosition.x + value: -0.644 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalPosition.y + value: -0.128 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalPosition.z + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4753320988497866, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114995780653097258, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_Text + value: "This scene shows how to map inputs from different sources to a user + defined input action and handle it via a single listener. \n\nWith the Rotatable + object in focus try one of the following actions:\n\n - Pres button B in + an Xbox controller.\n - Say 'Rotate'.\n - Perform the 'Hold' gesture. You + can do this in the editor pressing the left mouse button while keeping the + space bar pressed.\n\nThey should all trigger a rotation in the object.\n\nTo + achieve this, we created a custom 'Rotate' input action, mapped it to the + different inputs and added an InputActionHandler script to handle the action + and rotate the object. See the panel to the right for details." + objectReference: {fileID: 0} + - target: {fileID: 224802402503016246, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_SizeDelta.y + value: 1000 + objectReference: {fileID: 0} + - target: {fileID: 224802402503016246, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_LocalPosition.z + value: -0.019086003 + objectReference: {fileID: 0} + - target: {fileID: 224802402503016246, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0.302 + objectReference: {fileID: 0} + - target: {fileID: 224802402503016246, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224849082003076088, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0.093 + objectReference: {fileID: 0} + - target: {fileID: 114125765304321574, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_Text + value: Creating an input action + objectReference: {fileID: 0} + - target: {fileID: 1149545904682892, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1171793634254456, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1054075472835142, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114107642412081004, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_Text + value: 'Input Actions Example + +' + objectReference: {fileID: 0} + - target: {fileID: 114713125240876806, guid: a900c08743a94c328074df8bbe3eb63c, + type: 3} + propertyPath: m_Text + value: All Platforms + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a900c08743a94c328074df8bbe3eb63c, type: 3} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActionsExample.unity.meta b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActionsExample.unity.meta new file mode 100644 index 00000000000..7c4f2e47758 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/InputActionsExample.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f4de835693a34e649bcea611a3a7ee91 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/Rotator.cs b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/Rotator.cs new file mode 100644 index 00000000000..c135aa5682b --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/Rotator.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using UnityEngine; + +// Silly script that applies a rotation about the up axis on demand. +public class Rotator : MonoBehaviour +{ + public float angle = 45f; + + public void Rotate() + { + transform.Rotate(0, angle, 0); + } +} diff --git a/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/Rotator.cs.meta b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/Rotator.cs.meta new file mode 100644 index 00000000000..d037c0ad526 --- /dev/null +++ b/Assets/MixedRealityToolkit.Examples/Demos/Input/Scenes/InputActions/Rotator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6146f966d8bc21341b1f867dec39f0d1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/Input/Events/InputActionUnityEvent.cs b/Assets/MixedRealityToolkit.SDK/Features/Input/Events/InputActionUnityEvent.cs new file mode 100644 index 00000000000..b5cca74dbfe --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/Input/Events/InputActionUnityEvent.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using UnityEngine.Events; + +namespace Microsoft.MixedReality.Toolkit.Input +{ + /// + /// Unity event for input action events. Contains the data of the input event that triggered the action. + /// + [System.Serializable] + public class InputActionUnityEvent : UnityEvent { } +} diff --git a/Assets/MixedRealityToolkit.SDK/Features/Input/Events/InputActionUnityEvent.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/Input/Events/InputActionUnityEvent.cs.meta new file mode 100644 index 00000000000..0a13c0f9705 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/Input/Events/InputActionUnityEvent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 960761589c7be0745a4c41362e9e6a5c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/InputActionHandler.cs b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/InputActionHandler.cs new file mode 100644 index 00000000000..8d963aa92c7 --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/InputActionHandler.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using UnityEngine; +using UnityEngine.Events; + +namespace Microsoft.MixedReality.Toolkit.Input +{ + /// + /// Script used to handle input action events. Invokes Unity events when the configured input action starts or ends. + /// + public class InputActionHandler : BaseInputHandler, IMixedRealityInputActionHandler + { + [SerializeField] + [Tooltip("Input Action to handle")] + private MixedRealityInputAction InputAction = MixedRealityInputAction.None; + + [SerializeField] + [Tooltip("Whether input events should be marked as used after handling so other handlers in the same game object ignore them")] + private bool MarkEventsAsUsed = false; + + /// + /// Unity event raised on action start, e.g. button pressed or gesture started. + /// Includes the input event that triggered the action. + /// + public InputActionUnityEvent OnInputActionStarted; + + /// + /// Unity event raised on action end, e.g. button released or gesture completed. + /// Includes the input event that triggered the action. + /// + public InputActionUnityEvent OnInputActionEnded; + + void IMixedRealityInputActionHandler.OnActionStarted(BaseInputEventData eventData) + { + if (eventData.MixedRealityInputAction == InputAction && !eventData.used) + { + OnInputActionStarted.Invoke(eventData); + if (MarkEventsAsUsed) + { + eventData.Use(); + } + } + } + void IMixedRealityInputActionHandler.OnActionEnded(BaseInputEventData eventData) + { + if (eventData.MixedRealityInputAction == InputAction && !eventData.used) + { + OnInputActionEnded.Invoke(eventData); + if (MarkEventsAsUsed) + { + eventData.Use(); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/InputActionHandler.cs.meta b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/InputActionHandler.cs.meta new file mode 100644 index 00000000000..5f11388e5fd --- /dev/null +++ b/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/InputActionHandler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 19fe7721a0743104baae38e46537705b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputSystem.cs b/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputSystem.cs index e3f1803582c..c09d98b8622 100644 --- a/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputSystem.cs +++ b/Assets/MixedRealityToolkit.Services/InputSystem/MixedRealityInputSystem.cs @@ -960,6 +960,25 @@ public void RaisePointerUp(IMixedRealityPointer pointer, MixedRealityInputAction handler.OnInputDown(casted); }; + private static readonly ExecuteEvents.EventFunction OnInputDownWithActionEventHandler = + delegate (IMixedRealityBaseInputHandler handler, BaseEventData eventData) + { + var inputData = ExecuteEvents.ValidateEventData(eventData); + Debug.Assert(inputData.MixedRealityInputAction != MixedRealityInputAction.None); + + var inputHandler = handler as IMixedRealityInputHandler; + if (inputHandler != null) + { + inputHandler.OnInputDown(inputData); + } + + var actionHandler = handler as IMixedRealityInputActionHandler; + if (actionHandler != null) + { + actionHandler.OnActionStarted(inputData); + } + }; + /// public void RaiseOnInputDown(IMixedRealityInputSource source, Handedness handedness, MixedRealityInputAction inputAction) { @@ -969,7 +988,14 @@ public void RaiseOnInputDown(IMixedRealityInputSource source, Handedness handedn inputEventData.Initialize(source, handedness, inputAction); // Pass handler through HandleEvent to perform modal/fallback logic - HandleEvent(inputEventData, OnInputDownEventHandler); + if (inputEventData.MixedRealityInputAction == MixedRealityInputAction.None) + { + HandleEvent(inputEventData, OnInputDownEventHandler); + } + else + { + HandleEvent(inputEventData, OnInputDownWithActionEventHandler); + } } #endregion Input Down @@ -983,6 +1009,25 @@ public void RaiseOnInputDown(IMixedRealityInputSource source, Handedness handedn handler.OnInputUp(casted); }; + private static readonly ExecuteEvents.EventFunction OnInputUpWithActionEventHandler = + delegate (IMixedRealityBaseInputHandler handler, BaseEventData eventData) + { + var inputData = ExecuteEvents.ValidateEventData(eventData); + Debug.Assert(inputData.MixedRealityInputAction != MixedRealityInputAction.None); + + var inputHandler = handler as IMixedRealityInputHandler; + if (inputHandler != null) + { + inputHandler.OnInputUp(inputData); + } + + var actionHandler = handler as IMixedRealityInputActionHandler; + if (actionHandler != null) + { + actionHandler.OnActionEnded(inputData); + } + }; + /// public void RaiseOnInputUp(IMixedRealityInputSource source, Handedness handedness, MixedRealityInputAction inputAction) { @@ -992,7 +1037,14 @@ public void RaiseOnInputUp(IMixedRealityInputSource source, Handedness handednes inputEventData.Initialize(source, handedness, inputAction); // Pass handler through HandleEvent to perform modal/fallback logic - HandleEvent(inputEventData, OnInputUpEventHandler); + if (inputEventData.MixedRealityInputAction == MixedRealityInputAction.None) + { + HandleEvent(inputEventData, OnInputUpEventHandler); + } + else + { + HandleEvent(inputEventData, OnInputUpWithActionEventHandler); + } } #endregion Input Up @@ -1119,12 +1171,39 @@ public void RaisePoseInputChanged(IMixedRealityInputSource source, Handedness ha handler.OnGestureStarted(casted); }; + private static readonly ExecuteEvents.EventFunction OnGestureStartedWithAction = + delegate (IMixedRealityBaseInputHandler handler, BaseEventData eventData) + { + var inputData = ExecuteEvents.ValidateEventData(eventData); + Debug.Assert(inputData.MixedRealityInputAction != MixedRealityInputAction.None); + + var gestureHandler = handler as IMixedRealityGestureHandler; + if (gestureHandler != null) + { + gestureHandler.OnGestureStarted(inputData); + } + + var actionHandler = handler as IMixedRealityInputActionHandler; + if (actionHandler != null) + { + actionHandler.OnActionStarted(inputData); + } + }; + /// public void RaiseGestureStarted(IMixedRealityController controller, MixedRealityInputAction action) { action = ProcessRules(action, true); inputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action); - HandleEvent(inputEventData, OnGestureStarted); + + if (action == MixedRealityInputAction.None) + { + HandleEvent(inputEventData, OnGestureStarted); + } + else + { + HandleEvent(inputEventData, OnGestureStartedWithAction); + } } private static readonly ExecuteEvents.EventFunction OnGestureUpdated = @@ -1209,12 +1288,39 @@ public void RaiseGestureUpdated(IMixedRealityController controller, MixedReality handler.OnGestureCompleted(casted); }; + private static readonly ExecuteEvents.EventFunction OnGestureCompletedWithAction = + delegate (IMixedRealityBaseInputHandler handler, BaseEventData eventData) + { + var inputData = ExecuteEvents.ValidateEventData(eventData); + Debug.Assert(inputData.MixedRealityInputAction != MixedRealityInputAction.None); + + var gestureHandler = handler as IMixedRealityGestureHandler; + if (gestureHandler != null) + { + gestureHandler.OnGestureCompleted(inputData); + } + + var actionHandler = handler as IMixedRealityInputActionHandler; + if (actionHandler != null) + { + actionHandler.OnActionEnded(inputData); + } + }; + /// public void RaiseGestureCompleted(IMixedRealityController controller, MixedRealityInputAction action) { action = ProcessRules(action, false); inputEventData.Initialize(controller.InputSource, controller.ControllerHandedness, action); - HandleEvent(inputEventData, OnGestureCompleted); + + if (action == MixedRealityInputAction.None) + { + HandleEvent(inputEventData, OnGestureCompleted); + } + else + { + HandleEvent(inputEventData, OnGestureCompletedWithAction); + } } private static readonly ExecuteEvents.EventFunction> OnGestureVector2PositionCompleted = @@ -1303,6 +1409,26 @@ public void RaiseGestureCanceled(IMixedRealityController controller, MixedRealit handler.OnSpeechKeywordRecognized(casted); }; + private static readonly ExecuteEvents.EventFunction OnSpeechKeywordRecognizedWithActionEventHandler = + delegate (IMixedRealityBaseInputHandler handler, BaseEventData eventData) + { + var speechData = ExecuteEvents.ValidateEventData(eventData); + Debug.Assert(speechData.MixedRealityInputAction != MixedRealityInputAction.None); + + var speechHandler = handler as IMixedRealitySpeechHandler; + if (speechHandler != null) + { + speechHandler.OnSpeechKeywordRecognized(speechData); + } + + var actionHandler = handler as IMixedRealityInputActionHandler; + if (actionHandler != null) + { + actionHandler.OnActionStarted(speechData); + actionHandler.OnActionEnded(speechData); + } + }; + /// public void RaiseSpeechCommandRecognized(IMixedRealityInputSource source, RecognitionConfidenceLevel confidence, TimeSpan phraseDuration, DateTime phraseStartTime, SpeechCommands command) { @@ -1312,7 +1438,14 @@ public void RaiseSpeechCommandRecognized(IMixedRealityInputSource source, Recogn FocusProvider?.OnSpeechKeywordRecognized(speechEventData); // Pass handler through HandleEvent to perform modal/fallback logic - HandleEvent(speechEventData, OnSpeechKeywordRecognizedEventHandler); + if (command.Action == MixedRealityInputAction.None) + { + HandleEvent(speechEventData, OnSpeechKeywordRecognizedEventHandler); + } + else + { + HandleEvent(speechEventData, OnSpeechKeywordRecognizedWithActionEventHandler); + } } #endregion Speech Keyword Events diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityBaseInputHandler.cs b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityBaseInputHandler.cs new file mode 100644 index 00000000000..041d543f310 --- /dev/null +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityBaseInputHandler.cs @@ -0,0 +1,15 @@ +// 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; +using UnityEngine.EventSystems; + +namespace Microsoft.MixedReality.Toolkit.Input +{ + /// + /// Base interface for all input handlers. This allows us to use ExecuteEvents.ExecuteHierarchy<IMixedRealityBaseInputHandler> + /// to send an event to all input handling interfaces. + /// + public interface IMixedRealityBaseInputHandler : IEventSystemHandler {} +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityBaseInputHandler.cs.meta b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityBaseInputHandler.cs.meta new file mode 100644 index 00000000000..b0cc49b6ad8 --- /dev/null +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityBaseInputHandler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f95009a5cde168a4a859ad7cb67865f4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityGestureHandler.cs b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityGestureHandler.cs index 974b7471c28..00aace345d2 100644 --- a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityGestureHandler.cs +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityGestureHandler.cs @@ -8,7 +8,7 @@ namespace Microsoft.MixedReality.Toolkit.Input /// /// Interface to implement for generic gesture input. /// - public interface IMixedRealityGestureHandler : IEventSystemHandler + public interface IMixedRealityGestureHandler : IMixedRealityBaseInputHandler { /// /// Gesture Started Event. diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputActionHandler.cs b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputActionHandler.cs new file mode 100644 index 00000000000..968ba882f14 --- /dev/null +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputActionHandler.cs @@ -0,0 +1,27 @@ +// 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; +using UnityEngine.EventSystems; + +namespace Microsoft.MixedReality.Toolkit.Input +{ + /// + /// Interface to receive input action events. + /// + public interface IMixedRealityInputActionHandler : IMixedRealityBaseInputHandler + { + /// + /// Received on action start, e.g when a button is pressed or a gesture starts. + /// + /// Input event that triggered the action + void OnActionStarted(BaseInputEventData eventData); + + /// + /// Received on action end, e.g when a button is released or a gesture completed. + /// + /// Input event that triggered the action + void OnActionEnded(BaseInputEventData eventData); + } +} \ No newline at end of file diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputActionHandler.cs.meta b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputActionHandler.cs.meta new file mode 100644 index 00000000000..f70893d68af --- /dev/null +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputActionHandler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d6023132a99581c458efa56253a9d0dc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputHandler.cs b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputHandler.cs index c343e58df55..0ebcee0302e 100644 --- a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputHandler.cs +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealityInputHandler.cs @@ -10,7 +10,7 @@ namespace Microsoft.MixedReality.Toolkit.Input /// /// Interface to implement for simple generic input. /// - public interface IMixedRealityInputHandler : IEventSystemHandler + public interface IMixedRealityInputHandler : IMixedRealityBaseInputHandler { /// /// Input Up updates from Interactions, Keys, or any other simple input. diff --git a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealitySpeechHandler.cs b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealitySpeechHandler.cs index e8a88ef5cd1..40749a1235b 100644 --- a/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealitySpeechHandler.cs +++ b/Assets/MixedRealityToolkit/Interfaces/InputSystem/Handlers/IMixedRealitySpeechHandler.cs @@ -8,7 +8,7 @@ namespace Microsoft.MixedReality.Toolkit.Input /// /// Interface to implement to react to speech recognition. /// - public interface IMixedRealitySpeechHandler : IEventSystemHandler + public interface IMixedRealitySpeechHandler : IMixedRealityBaseInputHandler { void OnSpeechKeywordRecognized(SpeechEventData eventData); } From 611240bb50a4ad5e08aa8529248605efc3b5403d Mon Sep 17 00:00:00 2001 From: Niall Milsom Date: Tue, 28 May 2019 11:15:02 +0100 Subject: [PATCH 95/96] Get verbose logs from build.ps1 --- pipelines/templates/common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/templates/common.yml b/pipelines/templates/common.yml index 0b7c295c6fb..4744e328ca2 100644 --- a/pipelines/templates/common.yml +++ b/pipelines/templates/common.yml @@ -27,7 +27,7 @@ steps: - powershell: | $AutoMrtkVersion = Get-Date -format "dd.MM.yyyy" - .\build.ps1 -Version $AutoMrtkVersion -NoNuget + .\build.ps1 -Version $AutoMrtkVersion -NoNuget -Verbose displayName: 'Build Unity packages' - powershell: | From cad3b1e3af64460999f67b0a9a93e1f70f881915 Mon Sep 17 00:00:00 2001 From: Niall Milsom Date: Tue, 28 May 2019 15:10:36 +0100 Subject: [PATCH 96/96] Remove unity package step from pipelines --- pipelines/templates/common.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pipelines/templates/common.yml b/pipelines/templates/common.yml index 4744e328ca2..dde24e495bb 100644 --- a/pipelines/templates/common.yml +++ b/pipelines/templates/common.yml @@ -25,19 +25,6 @@ steps: PublishArtifacts: true ScriptingBackend: '.NET' -- powershell: | - $AutoMrtkVersion = Get-Date -format "dd.MM.yyyy" - .\build.ps1 -Version $AutoMrtkVersion -NoNuget -Verbose - displayName: 'Build Unity 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: