IsVersionCached() public static method

public static IsVersionCached ( string url, Hash128 hash ) : bool
url string
hash Hash128
return bool
示例#1
0
 public static bool IsVersionCached(string url, Hash128 hash)
 {
     if (string.IsNullOrEmpty(url))
     {
         throw new ArgumentException("Input AssetBundle url cannot be null or empty.");
     }
     return(Caching.IsVersionCached(url, "", hash));
 }
示例#2
0
 public static bool IsVersionCached(CachedAssetBundle cachedBundle)
 {
     if (string.IsNullOrEmpty(cachedBundle.name))
     {
         throw new ArgumentException("Input AssetBundle name cannot be null or empty.");
     }
     return(Caching.IsVersionCached("", cachedBundle.name, cachedBundle.hash));
 }
示例#3
0
        /// <summary>
        ///   <para>Checks if an AssetBundle is cached.</para>
        /// </summary>
        /// <param name="string">Url The filename of the AssetBundle. Domain and path information are stripped from this string automatically.</param>
        /// <param name="int">Version The version number of the AssetBundle to check for. Negative values are not allowed.</param>
        /// <param name="url"></param>
        /// <param name="version"></param>
        /// <returns>
        ///   <para>True if an AssetBundle matching the url and version parameters has previously been loaded using WWW.LoadFromCacheOrDownload() and is currently stored in the cache. Returns false if the AssetBundle is not in cache, either because it has been flushed from the cache or was never loaded using the Caching API.</para>
        /// </returns>
        public static bool IsVersionCached(string url, int version)
        {
            Hash128 hash = new Hash128(0U, 0U, 0U, (uint)version);

            return(Caching.IsVersionCached(url, hash));
        }
示例#4
0
 public static bool IsVersionCached(string url, int version)
 {
     return(Caching.IsVersionCached(url, new Hash128(0u, 0u, 0u, (uint)version)));
 }