private static void onClickedRemoveButton(SleekButton button) { if (PlaySettings.editorMap == null || PlaySettings.editorMap.Length == 0) { return; } for (int i = 0; i < MenuWorkshopEditorUI.levels.Length; i++) { if (MenuWorkshopEditorUI.levels[i] != null && MenuWorkshopEditorUI.levels[i].name == PlaySettings.editorMap && MenuWorkshopEditorUI.levels[i].isEditable) { Level.remove(MenuWorkshopEditorUI.levels[i].name); } } }