/// <summary> /// 表格测试 /// </summary> void ConfigTest() { ResMgr.Ins.LoadAB("exp_bytes.unity3d", (AssetBundle ab) => { BaseConfig.isUseLocalTable = App.Ins.UseLocalConfig; BaseConfig.mGameConfig = ab; ConfFact.Register(); BaseConfig.mGameConfig = null; Logger.Log(StrConfig.GetConfig(960).str); }, true); }
private IEnumerator LoadConfig() { WWW www = new WWW(@"D:\Git\new_path\UnityFrame_zsy\UnityFrame_zsy\Frame_zsy\Assets\StreamingAssets\android\exp_bytes.unity3d"); yield return(www); BaseConfig.isUseLocalTable = false; BaseConfig.mGameConfig = www.assetBundle; ConfFact.Register(); Debug.Log(StrConfig.GetConfig(900).str); }
/// <summary> /// 从表格获取字符串 /// </summary> /// <param name="id"></param> /// <returns></returns> public static string GetStr(int id) { StrConfig con = StrConfig.GetConfig(id); if (con != null) { return(con.str); } else { Logger.LogError("GetStr error:" + "ID:" + id); return(""); } }