Example #1
0
        private static ACacheItem _Editor_iPhone_BundleCreate(WebArgument argument)
        {
            var localPath = argument.localPath;
            var isLoadFromCacheOrDownload = (argument.flags & WebFlags.None) == 0;

            ACacheItem cacheItem;

            if (isLoadFromCacheOrDownload)
            {
                cacheItem = new LocalBundleCacheItem(argument.localPath);
            }
            else
            {
                cacheItem = new RemoteBundleCacheItem(argument.localPath, WebType.NewWWW);
            }

            return(cacheItem);
        }
Example #2
0
        private static ACacheItem _Editor_Android_BundleCreate(WebArgument argument)
        {
            var localPath                 = argument.localPath;
            var info                      = WebManager.Instance.GetMappingInfo(localPath);
            var isSmallEnough             = _IsSmallEnough(info);
            var isNewWWW                  = (argument.flags & WebFlags.NewWWW) != 0;
            var isLoadFromCacheOrDownload = isSmallEnough || !isNewWWW;

            ACacheItem cacheItem;

            if (isLoadFromCacheOrDownload)
            {
                cacheItem = new LocalBundleCacheItem(argument.localPath);
            }
            else
            {
                cacheItem = new RemoteBundleCacheItem(argument.localPath, WebType.NewWWW);
            }

            return(cacheItem);
        }