public void Load(FmsOptions options, string manifestUrl, FmsCallback onComplete, FmsCallback onError)
 {
     this.manifest = new PassthroughFileManifest();
     this.manifest.Prepare(options, "");
     Caching.CleanCache();
     onComplete();
 }
Пример #2
0
 private void OnManifestFailure(IFileManifest fileManifest)
 {
     this.fileManifest = fileManifest;
     if (this.onFailure != null)
     {
         this.onFailure(this);
     }
 }
Пример #3
0
 private void OnManifestSuccess(IFileManifest fileManifest)
 {
     this.fileManifest = fileManifest;
     if (this.onSuccess != null)
     {
         this.onSuccess(this);
     }
 }
Пример #4
0
 private void PrepareManifest(string json)
 {
     this.manifest = new VersionedFileManifest();
     this.manifest.Prepare(this.options, json);
     if (this.onComplete != null)
     {
         this.onComplete();
     }
 }
Пример #5
0
 public static void Add <T>(IFileManifest serverFileManifest)
 {
     if (!datas.ContainsKey(typeof(T)))
     {
         datas.Add(typeof(T), serverFileManifest);
     }
     else
     {
         datas[typeof(T)] = serverFileManifest;
     }
 }
 public void Load(FmsOptions options, string manifestUrl)
 {
     manifest = new PassthroughFileManifest();
     manifest.Prepare(options, "");
     Caching.ClearCache();
     if (options.FMSListener != null)
     {
         try
         {
             options.FMSListener.OnManifestLoadSuccess();
         }
         catch (Exception exception)
         {
             Debug.LogError("The FMS Listener threw an exception.");
             Debug.LogException(exception);
         }
         options.FMSListener.OnManifestLoadComplete();
     }
 }
        private void PrepareManifest(string json)
        {
            Exception ex = null;

            manifest = new VersionedFileManifest();
            try
            {
                manifest.Prepare(options, json);
            }
            catch (Exception ex2)
            {
                ex = ex2;
            }
            if (options.FMSListener != null)
            {
                try
                {
                    if (ex != null)
                    {
                        options.FMSListener.OnManifestLoadFailure(ex);
                    }
                    else
                    {
                        options.FMSListener.OnManifestLoadSuccess();
                    }
                }
                catch (Exception exception)
                {
                    Debug.LogError("The FMS Listener threw an exception.");
                    Debug.LogException(exception);
                }
                options.FMSListener.OnManifestLoadComplete();
            }
            else if (ex != null)
            {
                throw ex;
            }
        }