@@ -15,6 +15,8 @@ public class MixedRealityConfigurationProfileInspector : MixedRealityBaseConfigu
1515 {
1616 private static readonly GUIContent NewProfileContent = new GUIContent ( "+" , "Create New Profile" ) ;
1717
18+ // Experience properties
19+ private SerializedProperty targetExperienceScale ;
1820 // Camera properties
1921 private SerializedProperty enableCameraProfile ;
2022 private SerializedProperty cameraProfile ;
@@ -29,7 +31,6 @@ public class MixedRealityConfigurationProfileInspector : MixedRealityBaseConfigu
2931 // Boundary system properties
3032 private SerializedProperty enableBoundarySystem ;
3133 private SerializedProperty boundarySystemType ;
32- private SerializedProperty boundaryExperienceScale ;
3334 private SerializedProperty boundaryHeight ;
3435 private SerializedProperty enablePlatformBoundaryRendering ;
3536
@@ -68,18 +69,22 @@ private void OnEnable()
6869 }
6970
7071 configurationProfile = target as MixedRealityConfigurationProfile ;
72+ // Experience configuration
73+ targetExperienceScale = serializedObject . FindProperty ( "targetExperienceScale" ) ;
74+ // Camera configuration
7175 enableCameraProfile = serializedObject . FindProperty ( "enableCameraProfile" ) ;
7276 cameraProfile = serializedObject . FindProperty ( "cameraProfile" ) ;
77+ // Input system configuration
7378 enableInputSystem = serializedObject . FindProperty ( "enableInputSystem" ) ;
7479 inputSystemType = serializedObject . FindProperty ( "inputSystemType" ) ;
7580 inputActionsProfile = serializedObject . FindProperty ( "inputActionsProfile" ) ;
7681 enableSpeechCommands = serializedObject . FindProperty ( "enableSpeechCommands" ) ;
7782 speechCommandsProfile = serializedObject . FindProperty ( "speechCommandsProfile" ) ;
7883 enableControllerProfiles = serializedObject . FindProperty ( "enableControllerProfiles" ) ;
7984 controllersProfile = serializedObject . FindProperty ( "controllersProfile" ) ;
85+ // Boundary system configuration
8086 enableBoundarySystem = serializedObject . FindProperty ( "enableBoundarySystem" ) ;
8187 boundarySystemType = serializedObject . FindProperty ( "boundarySystemType" ) ;
82- boundaryExperienceScale = serializedObject . FindProperty ( "boundaryExperienceScale" ) ;
8388 boundaryHeight = serializedObject . FindProperty ( "boundaryHeight" ) ;
8489 enablePlatformBoundaryRendering = serializedObject . FindProperty ( "enablePlatformBoundaryRendering" ) ;
8590 }
@@ -93,7 +98,42 @@ public override void OnInspectorGUI()
9398 EditorGUIUtility . labelWidth = 160f ;
9499 EditorGUI . BeginChangeCheck ( ) ;
95100
96- // Camera Profile Configuration
101+ // Experience configuration
102+ EditorGUILayout . LabelField ( "Experience Settings" , EditorStyles . boldLabel ) ;
103+ EditorGUILayout . PropertyField ( targetExperienceScale , new GUIContent ( "Target Scale:" ) ) ;
104+ ExperienceScale scale = ( ExperienceScale ) targetExperienceScale . intValue ;
105+ string scaleDesciription = string . Empty ;
106+ switch ( scale )
107+ {
108+ case ExperienceScale . OrientationOnly :
109+ scaleDesciription = "The user is stationary. Position data does not change." ;
110+ break ;
111+
112+ case ExperienceScale . Seated :
113+ scaleDesciription = "The user is stationary and seated. The origin of the world is at a neutral head-level position." ;
114+ break ;
115+
116+ case ExperienceScale . Standing :
117+ scaleDesciription = "The user is stationary and standing. The origin of the world is on the floor, facing forward." ;
118+ break ;
119+
120+ case ExperienceScale . Room :
121+ scaleDesciription = "The user is free to move about the room. The origin of the world is on the floor, facing forward. Boundaries are available." ;
122+ break ;
123+
124+ case ExperienceScale . World :
125+ scaleDesciription = "The user is free to move about the world. Relies upon knowledge of the environment (Spatial Anchors and Spatial Mapping)." ;
126+ break ;
127+ }
128+ if ( scaleDesciription != string . Empty )
129+ {
130+ GUILayout . Space ( 6f ) ;
131+ EditorGUILayout . LabelField ( "Description:" , EditorStyles . label ) ;
132+ EditorGUILayout . LabelField ( scaleDesciription , EditorStyles . wordWrappedLabel ) ;
133+ }
134+
135+ // Camera Profile configuration
136+ GUILayout . Space ( 12f ) ;
97137 EditorGUILayout . LabelField ( "Camera Settings" , EditorStyles . boldLabel ) ;
98138 EditorGUILayout . PropertyField ( enableCameraProfile ) ;
99139
@@ -102,7 +142,8 @@ public override void OnInspectorGUI()
102142 RenderProfile ( cameraProfile ) ;
103143 }
104144
105- //Input System configuration
145+ // Input System configuration
146+ GUILayout . Space ( 12f ) ;
106147 EditorGUILayout . LabelField ( "Input Settings" , EditorStyles . boldLabel ) ;
107148 EditorGUILayout . PropertyField ( enableInputSystem ) ;
108149
@@ -118,7 +159,7 @@ public override void OnInspectorGUI()
118159 }
119160 }
120161
121- //Controller mapping configuration
162+ // Controller mapping configuration
122163 GUILayout . Space ( 12f ) ;
123164 EditorGUILayout . LabelField ( "Controller Mapping Settings" , EditorStyles . boldLabel ) ;
124165 EditorGUILayout . PropertyField ( enableControllerProfiles ) ;
@@ -128,20 +169,26 @@ public override void OnInspectorGUI()
128169 RenderProfile ( controllersProfile ) ;
129170 }
130171
131- //Boundary System configuration
172+ // Boundary System configuration
132173 GUILayout . Space ( 12f ) ;
133174 EditorGUILayout . LabelField ( "Boundary Settings" , EditorStyles . boldLabel ) ;
134175 EditorGUILayout . PropertyField ( enableBoundarySystem ) ;
135176
136177 if ( enableBoundarySystem . boolValue )
137178 {
138179 EditorGUILayout . PropertyField ( boundarySystemType ) ;
139- EditorGUILayout . PropertyField ( boundaryExperienceScale , new GUIContent ( "Experience Scale:" ) ) ;
140- if ( ( ExperienceScale ) boundaryExperienceScale . intValue == ExperienceScale . Room )
180+ // Boundary settings depend on the experience scale
181+
182+ if ( scale == ExperienceScale . Room )
141183 {
142184 EditorGUILayout . PropertyField ( boundaryHeight , new GUIContent ( "Boundary Height (in m):" ) ) ;
143185 EditorGUILayout . PropertyField ( enablePlatformBoundaryRendering , new GUIContent ( "Platform Rendering:" ) ) ;
144186 }
187+ else
188+ {
189+ GUILayout . Space ( 6f ) ;
190+ EditorGUILayout . LabelField ( "Boundaries are only supported in Room scale experiences." , EditorStyles . label ) ;
191+ }
145192 }
146193
147194 EditorGUIUtility . labelWidth = previousLabelWidth ;
0 commit comments