Exemplo n.º 1
0
 public AssetConfig(string gamename, AssetVersion aversion, AssetbundleConfig abconfig, PreloadConfig preloadConfig)
 {
     this.gName         = gamename;
     this.assetVersion  = aversion;
     this.abConfig      = abconfig;
     this.preloadConfig = preloadConfig;
 }
Exemplo n.º 2
0
        public static void LoadConfigFromServerSync(string url, System.Action <AssetConfig> result)
        {
            AssetVersion      version  = null;
            AssetbundleConfig abconfig = null;
            PreloadConfig     preload  = null;

            LoadAssetversionFromServer(url + "/assetVersion.con", _ => version = _);
            LoadBundleFromServer(url + "bundle.con", _ => abconfig             = _);
            LoadPreloadFromServer(url + "preload.con", _ => preload            = _);
            result(new AssetConfig("", version, abconfig, preload));
        }
Exemplo n.º 3
0
        public static AssetbundleConfig FromString(string str)
        {
            AssetbundleConfig con = new AssetbundleConfig();

            string[] strs = str.Split(',');
            for (int i = 0; i < strs.Length; i++)
            {
                if (strs[i] == "")
                {
                    continue;
                }
                string[] s = strs[i].Split('&');
                if (s.Length == 2)
                {
                    con.AddAssetBundle(s[0], s[1]);
                }
            }
            return(con);
        }
Exemplo n.º 4
0
 public static void LoadBundleFromServer(string url, System.Action <AssetbundleConfig> result)
 {
     App.Ins.AppMono.StartCoroutine(downloadFile(url, _ => {
         result(AssetbundleConfig.FromString(_));
     }));
 }