Skip to content

Commit 1df8679

Browse files
MaxWang-MSRogPodge
andcommitted
Address feedback
Co-Authored-By: RogPodge <[email protected]>
1 parent 9086324 commit 1df8679

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,16 @@ private static void ShowProjectConfigurationDialog()
8686
{
8787
if (!EditorApplication.isPlayingOrWillChangePlaymode
8888
&& !IgnoreProjectConfigForSession
89-
&& !MixedRealityProjectPreferences.IgnoreSettingsPrompt
90-
&& !MixedRealityProjectConfigurator.IsProjectConfigured())
89+
&& !MixedRealityProjectPreferences.IgnoreSettingsPrompt)
9190
{
92-
MixedRealityProjectConfiguratorWindow.ShowWindowOnInit();
91+
if (!XRSettingsUtilities.XREnabled)
92+
{
93+
MixedRealityProjectConfiguratorWindow.ShowWindowOnInit(false);
94+
}
95+
else if (!MixedRealityProjectConfigurator.IsProjectConfigured())
96+
{
97+
MixedRealityProjectConfiguratorWindow.ShowWindowOnInit(true);
98+
}
9399
}
94100
}
95101

@@ -100,7 +106,7 @@ private static void LogConfigurationWarnings()
100106
{
101107
if (!XRSettingsUtilities.XREnabled)
102108
{
103-
Debug.LogWarning("XR supported is not enabled in the project!");
109+
Debug.LogWarning("There is no prperly configured XR pipeline in the project! Please run the configurator by clicking on Mixed Reality (menu bar) -> Toolkit -> Utilities -> Configure Project for MRTK if the current settings are not desired.");
104110
}
105111

106112
if (!MixedRealityOptimizeUtils.IsOptimalRenderingPath())

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

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class MixedRealityProjectConfiguratorWindow : EditorWindow
1919
{
2020
private const float Default_Window_Height = 500.0f;
2121
private const float Default_Window_Width = 300.0f;
22-
private const string XRPipelineDocsUrl = "TO DO";
22+
private const string XRPipelineDocsUrl = "Pipeline docs not yet available";
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 readonly GUIContent ApplyButtonContent = new GUIContent("Apply", "Apply configurations to this Unity Project");
@@ -68,18 +68,25 @@ private static void resetNullableBoolState()
6868
isTMPEssentialsImported = null;
6969
}
7070

71-
[MenuItem("Mixed Reality/Toolkit/Utilities/Run Configurator...", false, 499)]
71+
[MenuItem("Mixed Reality/Toolkit/Utilities/Configure Project for MRTK", false, 499)]
7272
public static void ShowWindowFromMenu()
7373
{
7474
currentStage = ConfigurationStage.Init;
7575
ShowWindow();
7676
}
7777

78-
public static void ShowWindowOnInit()
78+
public static void ShowWindowOnInit(bool switchToConfigurationStage)
7979
{
8080
if (!IsOpen && currentStage == ConfigurationStage.Done)
8181
{
82-
currentStage = ConfigurationStage.ProjectConfiguration;
82+
if (switchToConfigurationStage)
83+
{
84+
currentStage = ConfigurationStage.ProjectConfiguration;
85+
}
86+
else
87+
{
88+
currentStage = ConfigurationStage.Init;
89+
}
8390
}
8491

8592
ShowWindow();
@@ -567,7 +574,7 @@ private void RenderConfigurationCompleted()
567574
{
568575
EditorGUILayout.LabelField("MRTK Setup Completed!", MixedRealityStylesUtility.BoldLargeTitleStyle);
569576
CreateSpace(5);
570-
EditorGUILayout.LabelField("You have finished setting up the project for Mixed Reality Toolkit. You may go through this process again by clicking on Mixed Reality (menu bar) -> Toolkit -> Utilities -> Run Configurator..."
577+
EditorGUILayout.LabelField("You have finished setting up the project for Mixed Reality Toolkit. You may go through this process again by clicking on Mixed Reality (menu bar) -> Toolkit -> Utilities -> Configure Project for MRTK"
571578
+ $"\n\nIf there are certain settings not set according to the recommendation you may see this configurator popping up again. You may use the Ignore or Later button to suppress the behavior. "
572579
+ "\n\nWe hope you enjoy using MRTK. Please find the links to our documentation and API references below. If you encountered something looking like a bug please report by opening an issue in our repository. "
573580
+ "\n\nThese links are accessible through Mixed Reality (menu bar) -> Toolkit -> Help.", EditorStyles.wordWrappedLabel);

Assets/MRTK/Core/Utilities/Editor/XRSettingsUtilities.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ public static bool XREnabled
3636
/// <summary>
3737
/// Checks whether the XRSDK pipeline is properly set up to enable XR.
3838
/// </summary>
39-
/// <remarks>
40-
/// <para>Returns true if using the Unity OpenXR plugin along with the Microsoft plugin or using the built-in plugins.
41-
/// Returns false if the only enabled plugin is Unity OpenXR and the Microsoft one is not present, or there is no enabled plugin.</para>
42-
/// </remarks>
39+
/// <remarks>Returns true if one or more XR SDK plugins are enabled.</remarks>
4340
public static bool XRSDKEnabled
4441
{
4542
get

0 commit comments

Comments
 (0)