Skip to content

Commit fafe929

Browse files
author
David Kline (ANALOG)
committed
add additional components header, code organization cleanup
1 parent 2a23e02 commit fafe929

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ public class MixedRealityConfigurationProfileInspector : MixedRealityBaseConfigu
2626
// Boundary system properties
2727
private SerializedProperty enableBoundarySystem;
2828
private SerializedProperty boundarySystemType;
29+
private SerializedProperty boundaryVisualizationProfile;
2930
// Teleport system properties
3031
private SerializedProperty enableTeleportSystem;
3132
private SerializedProperty teleportSystemType;
32-
private SerializedProperty boundaryVisualizationProfile;
33-
33+
// Additional registered components profile
3434
private SerializedProperty registeredComponentsProfile;
3535

3636
private MixedRealityConfigurationProfile configurationProfile;
@@ -85,10 +85,11 @@ private void OnEnable()
8585
// Boundary system configuration
8686
enableBoundarySystem = serializedObject.FindProperty("enableBoundarySystem");
8787
boundarySystemType = serializedObject.FindProperty("boundarySystemType");
88+
boundaryVisualizationProfile = serializedObject.FindProperty("boundaryVisualizationProfile");
8889
// Teleport system configuration
8990
enableTeleportSystem = serializedObject.FindProperty("enableTeleportSystem");
9091
teleportSystemType = serializedObject.FindProperty("teleportSystemType");
91-
boundaryVisualizationProfile = serializedObject.FindProperty("boundaryVisualizationProfile");
92+
// Additional registered components configuration
9293
registeredComponentsProfile = serializedObject.FindProperty("registeredComponentsProfile");
9394
}
9495

@@ -140,6 +141,7 @@ public override void OnInspectorGUI()
140141

141142
if (scaleDescription != string.Empty)
142143
{
144+
GUILayout.Space(6f);
143145
EditorGUILayout.HelpBox(scaleDescription, MessageType.Info);
144146
}
145147

@@ -160,16 +162,16 @@ public override void OnInspectorGUI()
160162
// Boundary System configuration
161163
GUILayout.Space(12f);
162164
EditorGUILayout.LabelField("Boundary System Settings", EditorStyles.boldLabel);
163-
EditorGUILayout.PropertyField(enableBoundarySystem);
164-
EditorGUILayout.PropertyField(boundarySystemType);
165-
changed |= RenderProfile(boundaryVisualizationProfile);
166-
167-
// Boundary settings depend on the experience scale
168165
if (scale != ExperienceScale.Room)
169166
{
167+
// Alert the user if the experience scale does not support boundary features.
168+
GUILayout.Space(6f);
169+
EditorGUILayout.HelpBox("Boundaries are only supported in Room scale experiences.", MessageType.Warning);
170170
GUILayout.Space(6f);
171-
EditorGUILayout.HelpBox("Boundary visualization is only supported in Room scale experiences.", MessageType.Warning);
172171
}
172+
EditorGUILayout.PropertyField(enableBoundarySystem);
173+
EditorGUILayout.PropertyField(boundarySystemType);
174+
changed |= RenderProfile(boundaryVisualizationProfile);
173175

174176
// Teleport System configuration
175177
GUILayout.Space(12f);
@@ -178,6 +180,7 @@ public override void OnInspectorGUI()
178180
EditorGUILayout.PropertyField(teleportSystemType);
179181

180182
GUILayout.Space(12f);
183+
EditorGUILayout.LabelField("Additional Components", EditorStyles.boldLabel);
181184
changed |= RenderProfile(registeredComponentsProfile);
182185

183186
if (!changed)

0 commit comments

Comments
 (0)