From c3eb094fdc9862a3ee1049a8aba00bbceb172c92 Mon Sep 17 00:00:00 2001 From: Oliver Wong Date: Wed, 15 Apr 2026 10:57:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=E9=9F=B3?= =?UTF-8?q?=E9=A2=91=E5=AF=BC=E5=85=A5=E8=B7=AF=E5=BE=84=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=B9=B6=E5=AE=8C=E5=96=84CLI=E6=96=B9=E6=B3=95=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将对话框中的音频资源路径变量从`k_audioResourcePath`更改为`AudioAbsolutePath` - 为RunCLI方法添加详细的XML文档注释,说明其在命令行自动化工作流中的作用 - 修正枚举AudioCategory的格式化 --- .../OCES/Audio/HandWritten/Editor/AudioImportTool.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/OCES/Audio/HandWritten/Editor/AudioImportTool.cs b/Assets/Scripts/OCES/Audio/HandWritten/Editor/AudioImportTool.cs index ffb95c2..20a6b2a 100644 --- a/Assets/Scripts/OCES/Audio/HandWritten/Editor/AudioImportTool.cs +++ b/Assets/Scripts/OCES/Audio/HandWritten/Editor/AudioImportTool.cs @@ -26,14 +26,20 @@ namespace OCES.Audio { if (EditorUtility.DisplayDialog( "Apply Audio Import Settings", - $"将对 {k_audioResourcePath} 下所有文件重新应用导入设置,确认继续?", + $"将对 {AudioAbsolutePath} 下所有文件重新应用导入设置,确认继续?", "确认", "取消")) { Run(); } } -// Unity -batchmode -executeMethod OCES.Audio.Editor.AudioImportTool.RunCLI + /// + /// 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. + /// public static void RunCli() { Debug.Log("[AudioImportTool] CLI 模式启动"); @@ -148,7 +154,7 @@ namespace OCES.Audio return true; } - enum AudioCategory {Music, SFX, Voice } + enum AudioCategory { Music, SFX, Voice } static AudioCategory ClassifyAudio( string fileName, // 不含扩展名