public static void LoadAllConfig(string strUrl, int cachid, CallBack onFinish = null) { string url = SQResourceLoader.LoadAssetBundle("AssetsResources/allgameconfigs"); if (Application.platform != RuntimePlatform.WindowsEditor) { url = strUrl; } Assets.LoadConfig(url, (bundle) => { if (bundle != null) { Object[] alldata = bundle.LoadAllAssets(); for (int i = 0; i < alldata.Length; i++) { Inst.mConfigCach[alldata[i].name] = alldata[i]; } bundle.Unload(false); if (onFinish != null) { onFinish(); } } else { Global.Inst.GetController <CommonTipsController>().ShowTips("资源下载失败,请检查网络后重新下载", "确定", () => { LoadAllConfig(url, cachid, onFinish); }); } }, cachid); }
private void LoadConfig(CallBack call) { ConfigManager.Creat(); //ConfigManager.LoadAllConfig(SQResourceLoader.LoadAssetBundle("AssetsResources/allgameconfigs"), 4, call); //return; if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.OSXEditor) { ConfigManager.LoadAllConfig(SQResourceLoader.LoadAssetBundle("AssetsResources/allgameconfigs"), 11, call); } else { call(); } }