From 5ec75688dbe553ed0b27c6d05511703f0f91bc16 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 15 九月 2025 20:14:53 +0800
Subject: [PATCH] 0312 增加材质

---
 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 80ff31a..f9d0188 100644
--- a/Assets/Editor/Tool/UpdateAssetBundleName.cs
+++ b/Assets/Editor/Tool/UpdateAssetBundleName.cs
@@ -116,6 +116,16 @@
             // EditorUtility.SetDirty(importer);
         }
 
+        guids = AssetDatabase.FindAssets("t:Material", new string[] { assetRelativePath });
+        foreach (var guid in guids)
+        {
+            var path = AssetDatabase.GUIDToAssetPath(guid);
+            var importer = AssetImporter.GetAtPath(path);
+            importer.assetBundleName = "ui/materials";
+
+            // EditorUtility.SetDirty(importer);
+        }
+
         Debug.Log("Window璧勬簮鍖呭悕鏇存柊瀹屾垚!");
         // AssetDatabase.SaveAssets();
         // AssetDatabase.Refresh();

--
Gitblit v1.8.0