示例#1
0
        public IEnumerator VerifyGetAssetBundleManifestWithUnverifiedBundle()
        {
            Debug.Log("Testing RemoteAssetBundleUtils.GetAssetBundleManifest");
            Task <RemoteAssetBundleManifest> task = RemoteAssetBundleUtils.GetAssetBundleManifest(TestConstants.TEST_SERVER_URL, Application.productName);

            while (!task.IsCompleted)
            {
                yield return(null);
            }
            RemoteAssetBundleManifest content = task.Result;

            // Should at the very least be an empty array
            Assert.AreNotEqual(content.bundles, null);
            Assert.AreEqual(content.bundles.Length, 0);
            Debug.Log("Passed");
        }
示例#2
0
        public IEnumerator VerifyGetAssetBundleManifest()
        {
            Debug.Log("Testing RemoteAssetBundleUtils.GetAssetBundleManifest");
            Task <RemoteAssetBundleManifest> task = RemoteAssetBundleUtils.GetAssetBundleManifest(TestConstants.TEST_SERVER_URL, Application.productName);

            while (!task.IsCompleted)
            {
                yield return(null);
            }
            RemoteAssetBundleManifest content = task.Result;

            // Should at the very least be an empty array
            Assert.AreNotEqual(content.bundles, null);
            Assert.AreEqual(content.bundles.Length, 1);
            foreach (var _bundle in content.bundles)
            {
                Assert.IsTrue(_bundle.toHash128().isValid);
                Assert.AreEqual(_bundle.appName, Application.productName);
            }
            Debug.Log("Passed");
        }
    public async Task OnLoadManifests()
    {
        string endpoint = FormatEndpoint(uploadEndpoint);

        if (!string.IsNullOrEmpty(endpoint))
        {
            try
            {
                EditorUtility.DisplayCancelableProgressBar("Remote Asset Bundles", "Loading All Manifests", 1.0f);
                RemoteAssetBundleManifest manifest = await RemoteAssetBundleUtils.GetAssetBundleManifest(endpoint, null, false);

                GUIEditTab.SetManifests(manifest);
                EditorUtility.ClearProgressBar();
            }
            catch (System.Exception ex)
            {
                EditorUtility.ClearProgressBar();
                GUIEditTab.AddMessage(string.Format("Unable to Load Manifests. Have you Uploaded any Asset Bundles? Info: {0}", ex.Message), MessageStatus.Error);
                throw;
            }
        }
    }