Esempio n. 1
0
 public void SetManifests(RemoteAssetBundleManifest manifest)
 {
     Manifests     = manifest;
     currentBundle = null;
     Apps          = new HashSet <string>();
     foreach (RemoteAssetBundle b in Manifests.bundles)
     {
         Apps.Add(b.appName);
     }
 }
Esempio n. 2
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");
        }
Esempio n. 3
0
    public void SelectCurrentManifest(string appName)
    {
        RemoteAssetBundleManifest manifest = new RemoteAssetBundleManifest();

        manifest.bundles = Manifests.bundles.Where(ab => ab.appName == appName).ToArray();
        if (manifest.bundles.Length == 0)
        {
            CurrentAppName = null;
            return;
        }
        CurrentManifest = manifest;
        CurrentAppName  = appName;
        MultiColumnHeaderState headerState = RemoteAssetBundleTreeView.CreateDefaultMultiColumnHeaderState();
        TreeViewState          state       = new TreeViewState();

        BundleTree = new RemoteAssetBundleTreeView(state, headerState, CurrentManifest, CurrentAppName);
    }
Esempio n. 4
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;
            }
        }
    }