Skip to content

Commit 725c31b

Browse files
committed
Remove unused code and cleanup utility GUI
1 parent cbeaa14 commit 725c31b

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

Assets/MixedRealityToolkit.Services/InputSystem/Utilities/CanvasUtility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public override void OnInspectorGUI()
2828
return;
2929
}
3030

31-
if (IsPartOfScene(canvas.gameObject) && CanSupportMrtkInput(canvas) && (canvas.worldCamera != null))
31+
if (IsPartOfScene(canvas.gameObject) && CanSupportMrtkInput(canvas) && (canvas.worldCamera != null) && !Application.isPlaying)
3232
{
3333
UnityEditor.EditorGUILayout.HelpBox("World Space Canvas should have no camera set to work properly with Mixed Reality Toolkit. At runtime, they'll get their camera set automatically.", UnityEditor.MessageType.Error);
3434
if (GUILayout.Button("Clear World Camera"))

Assets/MixedRealityToolkit/Inspectors/MixedRealityPreferences.cs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -64,33 +64,6 @@ public static bool IgnoreSettingsPrompt
6464

6565
#endregion Ignore startup settings prompt
6666

67-
#region Show Canvas Utility Prompt
68-
69-
private static readonly GUIContent CanvasUtilityContent = new GUIContent("Canvas world space utility dialogs", "Enable or disable the dialog popups for the world space canvas settings.\n\nThis setting only applies to the currently running project.");
70-
private const string CANVAS_KEY = "EnableCanvasUtilityDialog";
71-
private static bool isCanvasUtilityPrefLoaded;
72-
private static bool showCanvasUtilityPrompt;
73-
74-
/// <summary>
75-
/// Should the <see cref="Canvas"/> utility dialog show when updating the <see cref="RenderMode"/> settings on that component?
76-
/// </summary>
77-
public static bool ShowCanvasUtilityPrompt
78-
{
79-
get
80-
{
81-
if (!isCanvasUtilityPrefLoaded)
82-
{
83-
showCanvasUtilityPrompt = EditorPreferences.Get(CANVAS_KEY, true);
84-
isCanvasUtilityPrefLoaded = true;
85-
}
86-
87-
return showCanvasUtilityPrompt;
88-
}
89-
set => EditorPreferences.Set(CANVAS_KEY, showCanvasUtilityPrompt = value);
90-
}
91-
92-
#endregion Show Canvas Utility Prompt
93-
9467
[SettingsProvider]
9568
private static SettingsProvider Preferences()
9669
{

0 commit comments

Comments
 (0)