void DrawConfiguration(int index) { var conf = BuildConfigurationSettings.Instance.BuildConfigurations[index]; using (new IMGUIBlockWithIndent(new GUIContent("Settings"))) { conf.Name = IMGUILayout.TextField("Configuration Name:", conf.Name); conf.DefaultScenesFirst = IMGUILayout.ToggleFiled("Default Scenes First", conf.DefaultScenesFirst, IMGUIToggleStyle.ToggleType.YesNo); GUILayout.Space(EditorGUIUtility.singleLineHeight); using (new IMGUIBeginHorizontal()) { GUILayout.FlexibleSpace(); if (BuildConfigurationSettings.Instance.ActiveConfigurationIndex == index) { GUI.enabled = false; } bool active = GUILayout.Button("Set As Active", GUILayout.Width(100)); if (active) { BuildConfigurationSettings.Instance.ActiveConfigurationIndex = index; UpdateActiveConfUI(); } GUI.enabled = true; bool remove = GUILayout.Button("Remove", GUILayout.Width(100)); if (remove) { BuildConfigurationSettings.Instance.BuildConfigurations.Remove(conf); OnAwake(); GUIUtility.ExitGUI(); return; } } } if (conf.DefaultScenesFirst) { DrawDefaultScenes(conf); DrawPlatforms(conf); } else { DrawPlatforms(conf); DrawDefaultScenes(conf); } }