Skip to content

Commit 70689b9

Browse files
authored
Merge pull request #9652 from MaxWang-MS/add_configurator
Add a multistep configurator to facilitate project setup after importing MRTK
2 parents 595c4b5 + d9e78ac commit 70689b9

12 files changed

+951
-112
lines changed

Assets/MRTK/Core/Inspectors/MRTK.Inspectors.asmdef

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"Microsoft.MixedReality.Toolkit.Editor.BuildAndDeploy",
77
"Microsoft.MixedReality.Toolkit.Editor.ClassExtensions",
88
"Microsoft.MixedReality.Toolkit.Editor.Utilities",
9-
"Unity.TextMeshPro.Editor"
9+
"Unity.TextMeshPro.Editor",
10+
"Unity.TextMeshPro"
1011
],
1112
"optionalUnityReferences": [],
1213
"includePlatforms": [
@@ -17,5 +18,7 @@
1718
"overrideReferences": false,
1819
"precompiledReferences": [],
1920
"autoReferenced": true,
20-
"defineConstraints": []
21+
"defineConstraints": [],
22+
"versionDefines": [],
23+
"noEngineReferences": false
2124
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
using UnityEditor;
5+
using UnityEngine;
6+
7+
namespace Microsoft.MixedReality.Toolkit.Editor
8+
{
9+
/// <summary>
10+
/// Creates menu items to show users how to get help
11+
/// </summary>
12+
public class MixedRealityToolkitHelpLinks : MonoBehaviour
13+
{
14+
internal const string MRTKIssuePageUrl = "https://github.com/microsoft/MixedRealityToolkit-Unity/issues";
15+
internal const string MRTKDocsUrl = "https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/";
16+
internal const string MRTKAPIRefUrl = "https://docs.microsoft.com/dotnet/api/microsoft.mixedreality.toolkit";
17+
18+
[MenuItem("Mixed Reality/Toolkit/Help/Show Documentation", false)]
19+
private static void ShowDocumentation()
20+
{
21+
Application.OpenURL(MRTKDocsUrl);
22+
}
23+
[MenuItem("Mixed Reality/Toolkit/Help/Show API Reference", false)]
24+
private static void ShowAPIReference()
25+
{
26+
Application.OpenURL(MRTKAPIRefUrl);
27+
}
28+
[MenuItem("Mixed Reality/Toolkit/Help/File a bug report", false)]
29+
private static void FileBugReport()
30+
{
31+
Application.OpenURL(MRTKIssuePageUrl);
32+
}
33+
}
34+
}

Assets/MRTK/Core/Inspectors/MixedRealityToolkitHelpLinks.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 11 additions & 7 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.ShowWindow();
91+
if (!XRSettingsUtilities.XREnabled)
92+
{
93+
MixedRealityProjectConfiguratorWindow.ShowWindowOnInit(false);
94+
}
95+
else if (!MixedRealityProjectConfigurator.IsProjectConfigured())
96+
{
97+
MixedRealityProjectConfiguratorWindow.ShowWindowOnInit(true);
98+
}
9399
}
94100
}
95101

@@ -98,11 +104,9 @@ private static void ShowProjectConfigurationDialog()
98104
/// </summary>
99105
private static void LogConfigurationWarnings()
100106
{
101-
// Ensure compatibility with the pre-2019.3 XR architecture for customers / platforms
102-
// with legacy requirements.
103-
if (!XRSettingsUtilities.LegacyXREnabled)
107+
if (!XRSettingsUtilities.XREnabled)
104108
{
105-
Debug.LogWarning("<b>Virtual reality supported</b> not enabled. Check <i>XR Settings</i> under <i>Player Settings</i>");
109+
Debug.LogWarning("There is no properly 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.");
106110
}
107111

108112
if (!MixedRealityOptimizeUtils.IsOptimalRenderingPath())

0 commit comments

Comments
 (0)