Beispiel #1
0
 public static void SetCdnServer(string cdnServer)
 {
     if (cdnServer.IsEmpty())
     {
         return;
     }
     rootPath = GetPath(cdnServer, string.Empty, Platform.platform, TexFormatGroup.GetBest());
 }
Beispiel #2
0
        public static void GetResourceVersion(Action <string> callback)
        {
            string verUrl = string.Format("{0}/version_{1}.txt", Path, TexFormatGroup.GetBest().GetAbCategory(Platform.platform));

            Web.noCache.GetBytes(verUrl, bytes =>
            {
                if (bytes != null)
                {
                    string ver = Encoding.ASCII.GetString(bytes);
                    callback(ver);
                }
                else
                {
                    AssetCache.log.Error("Can't get cdn version from {0}", verUrl);
                    callback(null);
                }
            });
        }