refactor: 更新音频导入路径变量并完善CLI方法文档

- 将对话框中的音频资源路径变量从`k_audioResourcePath`更改为`AudioAbsolutePath`
- 为RunCLI方法添加详细的XML文档注释,说明其在命令行自动化工作流中的作用
- 修正枚举AudioCategory的格式化
This commit is contained in:
2026-04-15 10:57:33 +08:00
parent d2867810ee
commit c62cb4f37b
@@ -26,14 +26,20 @@ namespace OCES.Audio
{ {
if (EditorUtility.DisplayDialog( if (EditorUtility.DisplayDialog(
"Apply Audio Import Settings", "Apply Audio Import Settings",
$"将对 {k_audioResourcePath} 下所有文件重新应用导入设置,确认继续?", $"将对 {AudioAbsolutePath} 下所有文件重新应用导入设置,确认继续?",
"确认", "取消")) "确认", "取消"))
{ {
Run(); Run();
} }
} }
// Unity -batchmode -executeMethod OCES.Audio.Editor.AudioImportTool.RunCLI /// <summary>
/// Executes the audio import tool from the command line in batch mode.
/// This method is designed to be called via Unity's -executeMethod command line argument
/// and serves as the entry point for automated audio import workflows.
/// It initializes the process and delegates to the main Run method to apply
/// audio import settings to all supported audio files in the configured directory.
/// </summary>
public static void RunCli() public static void RunCli()
{ {
Debug.Log("[AudioImportTool] CLI 模式启动"); Debug.Log("[AudioImportTool] CLI 模式启动");
@@ -148,7 +154,7 @@ namespace OCES.Audio
return true; return true;
} }
enum AudioCategory {Music, SFX, Voice } enum AudioCategory { Music, SFX, Voice }
static AudioCategory ClassifyAudio( static AudioCategory ClassifyAudio(
string fileName, // 不含扩展名 string fileName, // 不含扩展名