private void OnGUI()
        {
            MixedRealityInspectorUtility.RenderMixedRealityToolkitLogo();

            string foldoutHeader;

            if (!MixedRealityProjectConfigurator.IsProjectConfigured())
            {
                foldoutHeader = "Modify Configurations";
                RenderChoiceDialog();
            }
            else
            {
                foldoutHeader = "Configurations";
                RenderConfiguredConfirmation();
            }

            EditorGUILayout.Space();

            showConfigurations = EditorGUILayout.Foldout(showConfigurations, foldoutHeader, true);
            if (showConfigurations)
            {
                RenderConfigurations();
            }
        }
        private void RenderDropDown(MRConfig configKey, string title, string[] collection, ref string selection)
        {
            bool configured = MixedRealityProjectConfigurator.IsConfigured(configKey);

            using (new EditorGUI.DisabledGroupScope(configured))
            {
                if (configured)
                {
                    EditorGUILayout.LabelField(new GUIContent($"{title} {selection}", InspectorUIUtility.SuccessIcon));
                }
                else
                {
                    int index = 0;
                    for (int i = 0; i < collection.Length; i++)
                    {
                        if (collection[i] != selection)
                        {
                            continue;
                        }

                        index = i;
                    }
                    index = EditorGUILayout.Popup(title, index, collection, EditorStyles.popup);

                    selection = collection[index];
                    if (selection == None)
                    {
                        // The user selected "None", return null. Unity uses this string where null
                        // is the underlying value.
                        selection = null;
                    }
                }
            }
        }
 private static void ShowProjectConfigurationDialog()
 {
     if (!EditorApplication.isPlayingOrWillChangePlaymode &&
         !IgnoreProjectConfigForSession &&
         !MixedRealityPreferences.IgnoreSettingsPrompt &&
         !MixedRealityProjectConfigurator.IsProjectConfigured())
     {
         MixedRealityProjectConfiguratorWindow.ShowWindow();
     }
 }
        private void ApplyConfigurations()
        {
            var configurationFilter = new HashSet<MRConfig>();
            foreach (var item in trackToggles)
            {
                if (item.Value)
                {
                    configurationFilter.Add(item.Key);
                }
            }

            MixedRealityProjectConfigurator.ConfigureProject(configurationFilter);
        }
 private void RenderToggle(MRConfig configKey, string title)
 {
     bool configured = MixedRealityProjectConfigurator.IsConfigured(configKey);
     using (new EditorGUI.DisabledGroupScope(configured))
     {
         if (configured)
         {
             EditorGUILayout.LabelField(new GUIContent(title, InspectorUIUtility.SuccessIcon));
             trackToggles[configKey] = false;
         }
         else
         {
             trackToggles[configKey] = EditorGUILayout.ToggleLeft(title, trackToggles[configKey]);
         }
     }
 }