Skip to content

Commit b20052f

Browse files
properly locks profile inspector
1 parent 9039275 commit b20052f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Assets/MixedRealityToolkit/_Core/Inspectors/Profiles/MixedRealityControllerVisualizationProfileInspector.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4+
using Microsoft.MixedReality.Toolkit.Core.Definitions;
45
using Microsoft.MixedReality.Toolkit.Core.Definitions.Devices;
56
using Microsoft.MixedReality.Toolkit.Core.Definitions.Utilities;
67
using Microsoft.MixedReality.Toolkit.Core.Devices.UnityInput;
@@ -86,6 +87,11 @@ public override void OnInspectorGUI()
8687
EditorGUILayout.HelpBox("Define all the custom controller visualizations you'd like to use for each controller type when they're rendered in the scene.", MessageType.Info);
8788
serializedObject.Update();
8889

90+
if (MixedRealityPreferences.LockProfiles && !((BaseMixedRealityProfile)target).IsCustomProfile)
91+
{
92+
GUI.enabled = false;
93+
}
94+
8995
EditorGUIUtility.labelWidth = 168f;
9096
EditorGUILayout.PropertyField(renderMotionControllers);
9197

0 commit comments

Comments
 (0)