// public static void TestChangeCaching() // { // string nameOfCachedBudle = "lvl4"; // var listOfPathss = new List<string>(); // Caching.GetAllCachePaths(listOfPathss); // string pathToBundle = listOfPathss[0] + "/" + nameOfCachedBudle; // if (!System.IO.Directory.Exists(pathToBundle)) // { // Debug.Log(" Folder does not exists"); // var infoAboutDirectory = System.IO.Directory.CreateDirectory(pathToBundle); // Debug.Log(" created into : " + infoAboutDirectory.FullName); // while (!System.IO.Directory.Exists(pathToBundle)) // { // // Wait // } // } // else // { // Debug.Log(" Folder exists!"); // } // var someNewCache = Caching.AddCache(nameOfCachedBudle); // // Move cache to the start of the queue // Caching.MoveCacheBefore(someNewCache, Caching.GetCacheAt(0)); // Caching.currentCacheForWriting = someNewCache; // } #endif // // [MenuItem("Test/testGetMetadata")] public static void TestGEtUrl() { var instanceMono = FindObjectOfType <TestBundleService>(); Instance = instanceMono; bytsFull = 0; Instance.StartCoroutine(Instance.justGetTheMetadata()); // instanceMono.instanceOfBundles.Initialize(instanceMono); // instanceMono.StartCoroutine(instanceMono.instanceOfBundles.LoadbundleCoroutine("lvl3", instanceMono.OnComplete, instanceMono.OnError, instanceMono.OnLoadDep, instanceMono.OnLoadMain)); }
public static async void TestGEtFileWithProgress() { var instanceMono = FindObjectOfType <TestBundleService>(); Instance = instanceMono; instanceMono.instanceOfBundles.Init(); string prefix = null; BundleOptions myOptions = new BundleOptions(); string bundleName = instanceMono.bundleName; // limit on a single package is around 130 000 bytes if (instanceMono.nowLoadJapanese) { myOptions.LoadLanguage = "ja"; prefix = "ja"; } else { myOptions.LoadLanguage = "en"; prefix = "en"; } if (instanceMono.LoadBigData) { bundleName = "bigdataobject"; prefix = null; myOptions.LoadBigdataObject = true; } Debug.Log(" Options Used :" + " bundleName " + bundleName + "prefix " + prefix + " , options " + myOptions.LoadLanguage + " BigData =" + myOptions.LoadBigdataObject); // If Strategy.NONE, used default from the Scriptable Object await instanceMono.instanceOfBundles.LoadAnybundleCoroutine( bundleName, instanceMono.ForceRenew, Strategy.NONE, instanceMono.OnComplete, instanceMono.OnError, instanceMono.OnLoadDep, instanceMono.OnLoadMain, Instance.GetPercentageOfDataCustom, prefix, myOptions); }