From ac18067b5e2447bc1ca614a54d50af63a34845df Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 26 十一月 2025 14:34:16 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_client

---
 Assets/Editor/Tool/UpdateAssetBundleName.cs |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/Assets/Editor/Tool/UpdateAssetBundleName.cs b/Assets/Editor/Tool/UpdateAssetBundleName.cs
index 994190f..c2e690e 100644
--- a/Assets/Editor/Tool/UpdateAssetBundleName.cs
+++ b/Assets/Editor/Tool/UpdateAssetBundleName.cs
@@ -428,6 +428,7 @@
     public static void SetAllAudioAssetBundleName()
     {
         var allFiles = new DirectoryInfo(rootPath).GetFiles("*.wav", SearchOption.AllDirectories);
+        var allFiles1 = new DirectoryInfo(rootPath).GetFiles("*.mp3", SearchOption.AllDirectories);
 
         foreach (var file in allFiles)
         {
@@ -437,6 +438,15 @@
             importer.assetBundleName = "audio/" + pathStringArray[pathStringArray.Length - 1].ToLower();
             // EditorUtility.SetDirty(importer);
         }
+
+        foreach (var file in allFiles1)
+        {
+            var pathStringArray = file.DirectoryName.Split(Path.DirectorySeparatorChar);
+            var importerPath = assetPath + pathStringArray[pathStringArray.Length - 1] + Path.DirectorySeparatorChar + file.Name;
+            var importer = AssetImporter.GetAtPath(importerPath);
+            importer.assetBundleName = "audio/" + pathStringArray[pathStringArray.Length - 1].ToLower();
+            // EditorUtility.SetDirty(importer);
+        }
         Debug.Log("Audio璧勬簮鍖呭悕鏇存柊瀹屾垚!");
         // AssetDatabase.SaveAssets();
         // AssetDatabase.Refresh();

--
Gitblit v1.8.0