@@ -21,7 +21,6 @@ public class MixedRealityToolkitConfigurationProfileInspector : BaseMixedReality
21
21
private static readonly GUIContent TargetScaleContent = new GUIContent ( "Target Scale:" ) ;
22
22
23
23
// Experience properties
24
- private SerializedProperty experienceSettingsType ;
25
24
private SerializedProperty experienceSettingsProfile ;
26
25
27
26
// Tracking the old experience scale property for compatibility
@@ -97,7 +96,6 @@ protected override void OnEnable()
97
96
MixedRealityToolkitConfigurationProfile mrtkConfigProfile = target as MixedRealityToolkitConfigurationProfile ;
98
97
99
98
// Experience configuration
100
- experienceSettingsType = serializedObject . FindProperty ( "experienceSettingsType" ) ;
101
99
experienceSettingsProfile = serializedObject . FindProperty ( "experienceSettingsProfile" ) ;
102
100
experienceScaleMigration = serializedObject . FindProperty ( "targetExperienceScale" ) ;
103
101
@@ -160,7 +158,7 @@ protected override void OnEnable()
160
158
oldExperienceSettingsScale = oldExperienceSettingsProfile . TargetExperienceScale ;
161
159
}
162
160
163
- changed |= RenderProfile ( experienceSettingsProfile , typeof ( MixedRealityExperienceSettingsProfile ) , true , false , null , true ) ;
161
+ changed |= RenderProfile ( experienceSettingsProfile , typeof ( MixedRealityExperienceSettingsProfile ) , true , false , null ) ;
164
162
165
163
// Experience configuration
166
164
if ( mrtkConfigProfile . ExperienceSettingsProfile != null )
@@ -258,14 +256,24 @@ protected override void OnEnable()
258
256
return changed ;
259
257
} ,
260
258
( ) => {
261
- var experienceScale = mrtkConfigProfile . ExperienceSettingsProfile . TargetExperienceScale ;
262
- if ( experienceScale != ExperienceScale . Room )
259
+ if ( mrtkConfigProfile . ExperienceSettingsProfile . IsNull ( ) )
263
260
{
264
- // Alert the user if the experience scale does not support boundary features.
261
+ // Alert that an experience settings profile has not been selected
265
262
GUILayout . Space ( 6f ) ;
266
- EditorGUILayout . HelpBox ( "Boundaries are only supported in Room scale experiences ." , MessageType . Warning ) ;
263
+ EditorGUILayout . HelpBox ( "Boundaries require an experience settings profile with a Room scale target experience scale ." , MessageType . Warning ) ;
267
264
GUILayout . Space ( 6f ) ;
268
265
}
266
+ else
267
+ {
268
+ var experienceScale = mrtkConfigProfile . ExperienceSettingsProfile . TargetExperienceScale ;
269
+ if ( experienceScale != ExperienceScale . Room )
270
+ {
271
+ // Alert the user if the experience scale does not support boundary features.
272
+ GUILayout . Space ( 6f ) ;
273
+ EditorGUILayout . HelpBox ( "Boundaries are only supported in Room scale experiences." , MessageType . Warning ) ;
274
+ GUILayout . Space ( 6f ) ;
275
+ }
276
+ }
269
277
270
278
bool changed = false ;
271
279
using ( var c = new EditorGUI . ChangeCheckScope ( ) )
0 commit comments