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();