private void DrawUserFiles(bool helpEnabled) { m_userFiles.m_autoAddNewFiles = m_editorUtils.Toggle("AutoAddNewFiles", m_userFiles.m_autoAddNewFiles, helpEnabled); m_userFiles.m_updateFilesWithGaiaUpdate = m_editorUtils.Toggle("UpdateWithGaia", m_userFiles.m_updateFilesWithGaiaUpdate, helpEnabled); GUILayout.Space(10); if (m_editorUtils.Button("AddDefaults")) { if (EditorUtility.DisplayDialog("Add Gaia Default Biomes?", "This will add the default Biomes & Spawners of Gaia back to the lists in case they are missing. Continue?", "Add Defaults", "Cancel")) { GaiaUtils.ResetBiomePresets(true); } } GUILayout.Space(10); m_editorUtils.Heading("BiomePresetHeading"); m_editorUtils.InlineHelp("BiomePresetHeading", helpEnabled); float deleteButtonWidth = 50; for (int i = 0; i < m_userFiles.m_gaiaManagerBiomePresets.Count; i++) { GUILayout.BeginHorizontal(); { m_userFiles.m_gaiaManagerBiomePresets[i] = (BiomePreset)EditorGUILayout.ObjectField(m_userFiles.m_gaiaManagerBiomePresets[i], typeof(BiomePreset), false); if (m_editorUtils.Button("DeleteBiomePreset", GUILayout.Width(deleteButtonWidth))) { m_userFiles.m_gaiaManagerBiomePresets.RemoveAt(i); } } GUILayout.EndHorizontal(); } GUILayout.BeginHorizontal(); { GUILayout.Space(EditorGUIUtility.labelWidth); if (m_editorUtils.Button("AddBiomePreset")) { m_userFiles.m_gaiaManagerBiomePresets.Add(null); } } GUILayout.EndHorizontal(); GUILayout.Space(10); m_editorUtils.Heading("SpawnerSettingsHeading"); m_editorUtils.InlineHelp("SpawnerSettingsHeading", helpEnabled); for (int i = 0; i < m_userFiles.m_gaiaManagerSpawnerSettings.Count; i++) { GUILayout.BeginHorizontal(); { m_userFiles.m_gaiaManagerSpawnerSettings[i] = (SpawnerSettings)EditorGUILayout.ObjectField(m_userFiles.m_gaiaManagerSpawnerSettings[i], typeof(SpawnerSettings), false); if (m_editorUtils.Button("DeleteSpawnerSettings", GUILayout.Width(deleteButtonWidth))) { m_userFiles.m_gaiaManagerSpawnerSettings.RemoveAt(i); } } GUILayout.EndHorizontal(); } GUILayout.BeginHorizontal(); { GUILayout.Space(EditorGUIUtility.labelWidth); if (m_editorUtils.Button("AddSpawnerSettings")) { m_userFiles.m_gaiaManagerSpawnerSettings.Add(null); } } GUILayout.EndHorizontal(); GUILayout.Space(10); m_editorUtils.Heading("ExportTerrainSettingsHeading"); m_editorUtils.InlineHelp("ExportTerrainSettingsHeading", helpEnabled); for (int i = 0; i < m_userFiles.m_exportTerrainSettings.Count; i++) { GUILayout.BeginHorizontal(); { m_userFiles.m_exportTerrainSettings[i] = (ExportTerrainSettings)EditorGUILayout.ObjectField(m_userFiles.m_exportTerrainSettings[i], typeof(ExportTerrainSettings), false); if (m_editorUtils.Button("DeleteExportTerrainSettings", GUILayout.Width(deleteButtonWidth))) { m_userFiles.m_exportTerrainSettings.RemoveAt(i); } } GUILayout.EndHorizontal(); } GUILayout.BeginHorizontal(); { GUILayout.Space(EditorGUIUtility.labelWidth); if (m_editorUtils.Button("AddExportTerrainSettings")) { m_userFiles.m_exportTerrainSettings.Add(null); } } GUILayout.EndHorizontal(); }