private void DrawBatch(int index) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent(BuilderManager.data.Batches[index].name)); if (GUILayout.Button("Build", EditorStyles.miniButtonLeft, GUILayout.MaxWidth(80f))) { if (EditorUtility.DisplayDialog("Builder", "Build " + BuilderManager.data.Batches[index].name + " batch?", "Yes", "No")) { BuilderManager.BuildBatch(index); } } if (GUILayout.Button("Edit", EditorStyles.miniButtonMid, GUILayout.MaxWidth(80f))) { BatchEditorWindow.EditBatch(index); } if (GUILayout.Button("Delete", EditorStyles.miniButtonRight, GUILayout.MaxWidth(80f))) { if (EditorUtility.DisplayDialog("Builder", "Really delete " + BuilderManager.data.Batches[index].name + " batch?", "Yes", "No")) { BuilderManager.data.RemoveBatch(index); } } EditorGUILayout.EndHorizontal(); }
private void AddNewBuildBatch() { BatchEditorWindow.EditBatch(BuilderManager.data.AddNewBatch()); }