Esempio n. 1
0
 /** 获取绝对URL
  * path = "Platform/IOS/config.assetbundle"
  * return "file:///xxxx/Platform/IOS/config.assetbundle";
  */
 public static string GetAbsoluteURL(string path)
 {
     if (persistentAssetFileList.Has(path))
     {
         return(RootUrlPersistent + path);
     }
     else
     {
         return(RootUrlStreaming + path);
     }
 }
        public static AssetFileList DiffAssetFileList(AssetFileList current, AssetFileList update)
        {
            AssetFileList diffs = new AssetFileList();

            AssetFile gameConstItem = null;

            int count = update.list.Count;

            for (int i = 0; i < count; i++)
            {
                AssetFile item = update.list[i];

                if (item.path == AssetManagerSetting.GameConstName)
                {
                    gameConstItem = item;
                    continue;
                }

                if (!current.Has(item.path))
                {
                    diffs.Add(item);
                }
                else if (item.md5 != current.Get(item.path).md5)
                {
                    diffs.Add(item);
                }
            }

            if (gameConstItem != null)
            {
                diffs.Add(gameConstItem);
            }
            else
            {
                diffs.Add(new AssetFile(AssetManagerSetting.GameConstName, "md5"));
            }

            return(diffs);
        }