@@ -62,6 +62,7 @@ protected override void OnEnable()
6262 "Later" ) )
6363 {
6464 var playspace = MixedRealityToolkit . Instance . MixedRealityPlayspace ;
65+ Debug . Assert ( playspace != null ) ;
6566 MixedRealityToolkit . Instance . ActiveProfile = configurationProfile ;
6667 }
6768 else
@@ -118,26 +119,28 @@ public override void OnInspectorGUI()
118119 return ;
119120 }
120121
121- if ( MixedRealityPreferences . LockProfiles && ! ( ( BaseMixedRealityProfile ) target ) . IsCustomProfile )
122+ EditorGUILayout . HelpBox ( "The Mixed Reality Toolkit's core SDK profiles can be used to get up and running quickly.\n \n " +
123+ "You can use the default profiles provided, copy and customize the default profiles, or create your own." , MessageType . Warning ) ;
124+ EditorGUILayout . BeginHorizontal ( ) ;
125+
126+ if ( GUILayout . Button ( "Copy & Customize" ) )
122127 {
123- EditorGUILayout . HelpBox ( "The Mixed Reality Toolkit's core SDK profiles can be used to get up and running quickly.\n \n " +
124- "You can use the default profiles provided, copy and customize the default profiles, or create your own." , MessageType . Warning ) ;
125- EditorGUILayout . BeginHorizontal ( ) ;
128+ CreateCopyProfileValues ( ) ;
129+ }
126130
127- if ( GUILayout . Button ( "Copy & Customize" ) )
128- {
129- CreateCopyProfileValues ( ) ;
130- }
131+ if ( GUILayout . Button ( "Create new profiles" ) )
132+ {
133+ ScriptableObject profile = CreateInstance ( nameof ( MixedRealityToolkitConfigurationProfile ) ) ;
134+ var newProfile = profile . CreateAsset ( "Assets/MixedRealityToolkit-Generated/CustomProfiles" ) as MixedRealityToolkitConfigurationProfile ;
135+ MixedRealityToolkit . Instance . ActiveProfile = newProfile ;
136+ Selection . activeObject = newProfile ;
137+ }
131138
132- if ( GUILayout . Button ( "Create new profiles" ) )
133- {
134- ScriptableObject profile = CreateInstance ( nameof ( MixedRealityToolkitConfigurationProfile ) ) ;
135- var newProfile = profile . CreateAsset ( "Assets/MixedRealityToolkit-Generated/CustomProfiles" ) as MixedRealityToolkitConfigurationProfile ;
136- MixedRealityToolkit . Instance . ActiveProfile = newProfile ;
137- Selection . activeObject = newProfile ;
138- }
139+ EditorGUILayout . EndHorizontal ( ) ;
139140
140- EditorGUILayout . EndHorizontal ( ) ;
141+ // We don't call the CheckLock method so won't get a duplicate message.
142+ if ( MixedRealityPreferences . LockProfiles && ! ( ( BaseMixedRealityProfile ) target ) . IsCustomProfile )
143+ {
141144 GUI . enabled = false ;
142145 }
143146
0 commit comments