Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Addressables.UpdateCatalogs API Problem

Discussion in 'Addressables' started by pontos_developer, Jun 16, 2021.

  1. pontos_developer

    pontos_developer

    Joined:
    May 20, 2020
    Posts:
    15
    As the title,when I called the Api Addressables.UpdateCatalogs,the catalog in local didn't update.
    (I already update the catalog in my server.)


    I have tried two method
    1
    Code (CSharp):
    1.  IEnumerator UpdateCatalogs()
    2. {
    3.     AsyncOperationHandle<List<IResourceLocator>> updateHandle = Addressables.UpdateCatalogs();
    4.     yield return updateHandle;
    5. }
    And error code is following:
    Exception encountered in operation CompletedOperation, status=Failed, result= : Content update not available.
    upload_2021-6-16_23-2-40.png

    2.(Disable Catalog Update On Start)
    Code (CSharp):
    1. IEnumerator UpdateCatalogs()
    2. {
    3.     List<string> catalogsToUpdate = new List<string>();
    4.     AsyncOperationHandle<List<string>> checkForUpdateHandle = Addressables.CheckForCatalogUpdates();
    5.     checkForUpdateHandle.Completed += op =>
    6.     {
    7.         catalogsToUpdate.AddRange(op.Result);
    8.     };
    9.     yield return checkForUpdateHandle;
    10.     if (catalogsToUpdate.Count > 0)
    11.     {
    12.         AsyncOperationHandle<List<IResourceLocator>> updateHandle = Addressables.UpdateCatalogs(catalogsToUpdate);
    13.         yield return updateHandle;
    14.     }
    15. }
    No matter what I choose disable catalog update or not, I still can't update my catalog.
    The Unity Version 2019.4.17f1
    The Addressable Version 1.16.19

    Can someone help me? Thank a lot. :)
     

    Attached Files:

    Last edited: Jun 17, 2021
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,444
  3. pontos_developer

    pontos_developer

    Joined:
    May 20, 2020
    Posts:
    15