Skip to content

Commit 9dc5a8e

Browse files
authored
Merge pull request #10012 from keveleigh/merge-2.7.1
Merge 2.7.1 -> main
2 parents 7c2c701 + 9a1af3c commit 9dc5a8e

File tree

5 files changed

+29
-13
lines changed

5 files changed

+29
-13
lines changed

Assets/MRTK/Core/Inspectors/Setup/MixedRealityProjectConfiguratorWindow.cs

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class MixedRealityProjectConfiguratorWindow : EditorWindow
2323
private const string XRSDKUnityDocsUrl = "https://docs.unity3d.com/Manual/configuring-project-for-xr.html";
2424
private const string MSOpenXRPluginUrl = "https://aka.ms/openxr-unity-install";
2525
private const string MRTKConfiguratorLogPrefix = "[MRTK Configurator]";
26-
private const string XRPipelineIntro = "To build applications for AR/VR headsets you need to enable an XR pipeline. ";
26+
private const string XRPipelineIntro = "To build applications for AR/VR devices you need to enable an XR pipeline. Please make sure you are targeting the desired build target before proceeding. ";
2727
private const string AlternativePipelineText = "\n\nFor more information on alternative pipelines, please click on the Learn More button.";
2828
private readonly GUIContent ApplyButtonContent = new GUIContent("Apply", "Apply configurations to this Unity Project");
2929
private readonly GUIContent SkipButtonContent = new GUIContent("Skip This Step", "Skip to the next step");
@@ -284,20 +284,33 @@ private void RenderLegacyXRPipelineDetected()
284284
private void RenderMicrosoftOpenXRPipelineDetected()
285285
{
286286
EditorGUILayout.LabelField("XR Pipeline Setting - XR SDK with Unity + Microsoft OpenXR plugins in use", EditorStyles.boldLabel);
287-
EditorGUILayout.LabelField(XRPipelineIntro
288-
+ $"\n\nThe XR SDK pipeline with Unity and Microsoft OpenXR plugins are detected in the project. You are good to go."
289-
+ AlternativePipelineText, EditorStyles.wordWrappedLabel);
287+
EditorGUILayout.LabelField(XRPipelineIntro + $"\n\nThe XR SDK pipeline with Unity and Microsoft OpenXR plugins are detected in the project. You are good to go.", EditorStyles.wordWrappedLabel);
290288
CreateSpace(15);
289+
GUIStyle richTextLabelStyle = new GUIStyle(EditorStyles.helpBox)
290+
{
291+
richText = true,
292+
wordWrap = true,
293+
fontSize = 12
294+
};
295+
EditorGUILayout.LabelField("<size=18><b>Important - for first time setup only</b></size>\n\nIf you are setting up OpenXR <b>for the first time and are targeting HoloLens 2</b>, " +
296+
"click on the Apply Settings button below to apply recommended project settings <b>before clicking Next</b>. You can safely proceed (click Next) if there is no error message or only one regarding Holographic Remoting for Play Mode.\n" +
297+
"If you are targeting Windows Mixed Reality headset or prefer setting up manually, click on the Learn More button and refer to the manual setup section.", richTextLabelStyle);
298+
CreateSpace(30);
291299
using (new EditorGUILayout.HorizontalScope())
292300
{
301+
if (GUILayout.Button("Apply Settings"))
302+
{
303+
Debug.Log(MRTKConfiguratorLogPrefix + " Applying recommended project settings for HoloLens 2. Operation performed is equivalent to clicking on Mixed Reality -> Project -> Apply recommended project settings for HoloLens 2.");
304+
EditorApplication.ExecuteMenuItem("Mixed Reality/Project/Apply recommended project settings for HoloLens 2");
305+
}
293306
if (GUILayout.Button("Next"))
294307
{
295308
CurrentStage = ConfigurationStage.ProjectConfiguration;
296309
Repaint();
297310
}
298311
if (GUILayout.Button("Learn More"))
299312
{
300-
Application.OpenURL(XRPipelineDocsUrl);
313+
Application.OpenURL(MSOpenXRPluginUrl);
301314
}
302315

303316
}

Assets/MRTK/Core/Providers/UnityInput/UnityJoystickManager.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ namespace Microsoft.MixedReality.Toolkit.Input.UnityInput
1818
typeof(IMixedRealityInputSystem),
1919
(SupportedPlatforms)(-1), // All platforms supported by Unity
2020
"Unity Joystick Manager")]
21-
#if UNITY_2020_1_OR_NEWER
22-
[Obsolete("The legacy XR pipeline has been removed in Unity 2020 or newer. Please migrate to XR SDK.")]
23-
#endif // UNITY_2020_1_OR_NEWER
2421
public class UnityJoystickManager : BaseInputDeviceManager
2522
{
2623
/// <summary>
@@ -237,8 +234,11 @@ protected virtual SupportedControllerType GetCurrentControllerType(string joysti
237234
{
238235
// todo: this should be using an allow list, not a disallow list
239236
if (string.IsNullOrEmpty(joystickName) ||
240-
joystickName.Contains("OpenVR") ||
241-
joystickName.Contains("Spatial"))
237+
joystickName.Contains("OpenVR") || // This catches input sources from legacy OpenVR
238+
joystickName.Contains("OpenXR") || // This catches input sources from OpenXR Plugin
239+
joystickName.Contains("Oculus") || // This catches controllers from Oculus XR Plugin
240+
joystickName.Contains("Hand - ") || // This catches HoloLens hands from Windows XR Plugin
241+
joystickName.Contains("Spatial")) // This catches controllers from Windows XR Plugin and all input sources from legacy WMR
242242
{
243243
return 0;
244244
}

Assets/MRTK/Providers/OpenXR/Scripts/OpenXRHandMeshProvider.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ private Vector2[] InitializeUVs(Vector3[] neutralPoseVertices)
122122
{
123123
if (neutralPoseVertices.Length == 0)
124124
{
125-
Debug.LogError("Loaded 0 verts for neutralPoseVertices");
125+
Debug.LogError("Loaded 0 vertices for neutralPoseVertices");
126+
return System.Array.Empty<Vector2>();
126127
}
127128

128129
float minY = neutralPoseVertices[0].y;

Assets/MRTK/Providers/WindowsMixedReality/Shared/WindowsMixedRealityHandMeshProvider.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ private void InitializeUVs(Vector3[] poseVertices)
7878
{
7979
if (poseVertices.Length == 0)
8080
{
81-
Debug.LogError("Loaded 0 verts for poseVertices");
81+
Debug.LogError("Loaded 0 vertices for poseVertices");
82+
handMeshUVsUnity = Array.Empty<Vector2>();
83+
return;
8284
}
8385

8486
float minY = poseVertices[0].y;

Assets/MRTK/Tests/EditModeTests/Core/Utilities/BuildAndDeploy/UwpAppxBuildToolsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class UwpAppxBuildToolsTest
2626
xmlns:mobile='http://schemas.microsoft.com/appx/manifest/mobile/windows10'
2727
IgnorableNamespaces='uap uap2 uap3 uap4 mp mobile iot'
2828
xmlns='http://schemas.microsoft.com/appx/manifest/foundation/windows10'>
29-
<Identity Name='Microsoft.MixedReality.Toolkit' Publisher='CN=Microsoft' Version='2.7.0.0' />
29+
<Identity Name='Microsoft.MixedReality.Toolkit' Publisher='CN=Microsoft' Version='2.8.0.0' />
3030
<mp:PhoneIdentity PhoneProductId='85c8bcd4-fbac-44ed-adf6-bfc01242a27f' PhonePublisherId='00000000-0000-0000-0000-000000000000' />
3131
<Properties>
3232
<DisplayName>MixedRealityToolkit</DisplayName>

0 commit comments

Comments
 (0)