private void OnDrawDLC() { // 列表显示 EditorGUILayout.Space(); EditorGUILayout.LabelField($"[ DLC ]"); for (int i = 0; i < AssetBundleCollectorSettingData.Setting.DLCFiles.Count; i++) { string filePath = AssetBundleCollectorSettingData.Setting.DLCFiles[i]; EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField(filePath); if (GUILayout.Button("-", GUILayout.MaxWidth(40))) { AssetBundleCollectorSettingData.RemoveDLC(filePath); break; } } EditorGUILayout.EndHorizontal(); } // 添加按钮 if (GUILayout.Button("+")) { string resultPath = EditorTools.OpenFilePath("Select File", "Assets/"); if (resultPath != null) { string filePath = EditorTools.AbsolutePathToAssetPath(resultPath); AssetBundleCollectorSettingData.AddDLC(filePath); } } }