void OnGUI_UpgradeTileSystems() { RotorzEditorGUI.Title("Step 3: Upgrade Tile Systems"); GUILayout.Space(3); if (EditorApplication.isPlaying) { GUILayout.Label("Cannot upgrade tile systems during play mode.", EditorStyles.wordWrappedMiniLabel); return; } if (_systems == null || _systems.Count == 0) { OnGUI_NoOlderTileSystems(); return; } RotorzEditorGUI.Splitter(); GUILayout.Space(-7); _scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition); EditorGUILayout.HelpBox("Ensure that your project is backed up before proceeding.", MessageType.Warning, true); GUILayout.Space(7); foreach (TileSystemItem item in _systems) { GUILayout.Space(-4); DrawTileSystemItem(item); GUILayout.Space(2); RotorzEditorGUI.SplitterLight(); } GUILayout.FlexibleSpace(); EditorGUILayout.EndScrollView(); GUILayout.Space(-7); RotorzEditorGUI.Splitter(); switch (GUILayout.Toolbar(-1, new string[] { "All", "None", "Invert" })) { case 0: // All for (int i = 0; i < _systems.Count; ++i) { _systems[i].selected = true; } break; case 1: // None for (int i = 0; i < _systems.Count; ++i) { _systems[i].selected = false; } break; case 2: // Invert for (int i = 0; i < _systems.Count; ++i) { _systems[i].selected = !_systems[i].selected; } break; } GUILayout.Space(5); GUI.enabled = _systems.FindIndex(item => item.selected) != -1; if (GUILayout.Button("Bulk Upgrade", GUILayout.Height(24))) { OnBulkUpgrade(); GUIUtility.ExitGUI(); } GUI.enabled = true; GUILayout.Space(5); }