/// <summary> /// 构建需要打包的资源的路径、包名以及包的后缀 /// </summary> public List <AssetBundleBuild> AssetbundleEntry_Building() { this.ABEntries = this.GenerateABEntries(); if (ABEntries == null) { ABEntries = new List <ABEntry>(); } // 资源预处理 List <ABEntryProcessor> rABEntryProcessors = new List <ABEntryProcessor>(); foreach (var rEntry in ABEntries) { ABEntryProcessor rProcessor = ABEntryProcessor.Create(rEntry); rProcessor.PreprocessAssets(); rProcessor.ProcessAssetBundleLabel(); rABEntryProcessors.Add(rProcessor); } // 打包 List <AssetBundleBuild> rABBList = new List <AssetBundleBuild>(); foreach (var rProcessor in rABEntryProcessors) { rABBList.AddRange(rProcessor.ToABBuild()); } return(rABBList); }
public void UpdateAllAssetsABLabels(string aBEntryConfigPath) { this.ABEntries = this.GenerateABEntries(); if (ABEntries == null) { ABEntries = new List <ABEntry>(); } // 资源预处理 List <ABEntryProcessor> rABEntryProcessors = new List <ABEntryProcessor>(); foreach (var rEntry in ABEntries) { ABEntryProcessor rProcessor = ABEntryProcessor.Create(rEntry); rProcessor.PreprocessAssets(); rProcessor.ProcessAssetBundleLabel(); rABEntryProcessors.Add(rProcessor); } AssetDatabase.RemoveUnusedAssetBundleNames(); }