예제 #1
0
    private void RemoveCache(string cacheName)
    {
        var target = CachingUtils.GetCacheDirectory(_buildInfo.CompanyName, _buildInfo.ProductName) + "/" + cacheName;

        CleanDirectory(target);
        Console_WriteLine("RemoveCache :" + cacheName);
    }
예제 #2
0
    public void ContinueBundleCache()
    {
        EditorPrefs.SetBool("Builder.ContinuePending", false);
        _continueRequired = false;

        try
        {
            string exception = PlayerPrefs.GetString("AssetBundlesDatabaseCacher.Exception");
            if (!string.IsNullOrEmpty(exception))
            {
                throw (System.Exception)BuildUtils.InstantiateByTypeName(exception);
            }

            var cacheDirectory = CachingUtils.GetCacheDirectory(PlayerSettings.companyName, PlayerSettings.productName);
            foreach (var cachePath in Directory.GetDirectories(cacheDirectory))
            {
                string path = Path.Combine(_bundlesCachePath, Path.GetFileName(cachePath));
                Directory.Move(cachePath, path);
            }

            BuildBundleBasedPlayer();
        }
        finally
        {
            FinalizeAll();
            if (UnityEditorInternal.InternalEditorUtility.inBatchMode)
            {
                EditorApplication.Exit(0);
            }
        }
    }
예제 #3
0
    private void CopyToCache(string cacheName)
    {
        var original = StreamingAssetsDirectory + "/BundlesCache/" + cacheName;
        var target   = CachingUtils.GetCacheDirectory(_buildInfo.CompanyName, _buildInfo.ProductName) + "/" + cacheName;

        Directory.CreateDirectory(target);
        foreach (var file in Directory.GetFiles(original))
        {
            File.Copy(file, file.Replace(original, target), true);
        }

#if UNITY_IPHONE
        iPhone.SetNoBackupFlag(CachingUtils.CacheDirectory);


        Console_WriteLine("=== not backing up ===" + CachingUtils.CacheDirectory);
#endif
    }