Skip to content

Commit 0c813f5

Browse files
author
David Kline
authored
Merge pull request #10001 from MaxWang-MS/improve_openxr_configurator
Improve configurator instructions for OpenXR
2 parents c455058 + 366871d commit 0c813f5

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
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
}

0 commit comments

Comments
 (0)