static void CreateAssetBundle() { SetAllABName(); string path = EditorUtility.SaveFilePanel("Export AssetBundle", "", "assetbundle", "assetbundle"); if (string.IsNullOrEmpty(path)) { return; } int index = path.LastIndexOf("/"); path = path.Substring(0, index); BuildPipeline.BuildAssetBundles(path, BuildAssetBundleOptions.None, Platform); AssetDatabase.Refresh(); Log_Debug.Log("打包OK"); }
public void Parse(Action LoadOk) { if (LoadOk != null) { LoadResOk = LoadOk; } InitConfig(); int ConfigCount = ConfigDic.Count; foreach (KeyValuePair <string, Type> type in ConfigDic) { TextAsset xmlText = ResManager.GetResource <TextAsset>(type.Key); if (xmlText == null) { Log_Debug.LogError("load config err"); } try { type.Value.GetMethod("Parse").Invoke(null, new object[1] { xmlText }); } catch (Exception err) { Log_Debug.Log(type.Key); Log_Debug.LogError("loading config error:" + err.Message); } ConfigCount--; if (ConfigCount <= 0) { if (LoadResOk != null) { LoadResOk(); } } } }