Пример #1
0
        ///<summary>Convenience method that wraps <see cref="GetAssetBundleManifestAsync"/>
        ///<param name="url">The absolute URL to the GET endpoint</param>
        ///<param name="appName">Optional parameter to filter the manifest by product name</param>
        ///<returns>Returns a Task which returns deserialized AssetBundleManifest struct</returns>
        ///</summary>
        public static async Task <RemoteAssetBundleManifest> GetAssetBundleManifest(string url, string appName = null, bool verified = true)
        {
            HttpResponseMessage response = await GetAssetBundleManifestAsync(url, appName, verified);

            string content = await response.Content.ReadAsStringAsync();

            return(RemoteAssetBundleManifest.Deserialize(content));
        }
 public RemoteAssetBundleTreeView(TreeViewState treeViewState, MultiColumnHeaderState header, RemoteAssetBundleManifest manifest, string AppName) : base(treeViewState, new MultiColumnHeader(header))
 {
     Manifest  = manifest;
     rowHeight = 20;
     columnIndexForTreeFoldouts    = 2;
     showAlternatingRowBackgrounds = true;
     showBorder = true;
     Reload();
 }
Пример #3
0
        private async Task FetchAllManifestsAwaitable()
        {
            UpdateProgressBar(1.0f, "Checking for New Content");
            RemoteAssetBundleManifest[] manifests = new RemoteAssetBundleManifest[remoteAssetBundleMaps.Length];
            RemoteAssetBundleMap        map;

            for (int i = 0; i < remoteAssetBundleMaps.Length; i++)
            {
                map          = remoteAssetBundleMaps[i];
                map.Manifest = await RemoteAssetBundleUtils.GetAssetBundleManifest(remoteAssetBundleEndpoint, map.appName, verified);

                if (map.Manifest.bundles != null && map.Manifest.bundles.Length > 0)
                {
                    newContentAvailable = true;
                }
                manifests[i] = map.Manifest;
            }
            if (OnManifestsRetrieved != null)
            {
                OnManifestsRetrieved(manifests);
            }
        }
Пример #4
0
        public static RemoteAssetBundleManifest Deserialize(string val)
        {
            RemoteAssetBundleManifest obj = JsonUtility.FromJson <RemoteAssetBundleManifest>(val);

            return(obj);
        }