Search Unity

Update on mobile from remote server

Discussion in 'Addressables' started by jiahongzeng, Sep 17, 2019.

  1. jiahongzeng

    jiahongzeng

    Joined:
    Jul 24, 2019
    Posts:
    18
    Hi

    I use addressable(version 1.2.3) and try to update my data on mobile(Android system) from remote server.
    I select the Build Remote Catalog and set up the Remote Catalog Build Path and Load Path in AddressableAssetSettings.
    When I upload the new data to the server and reopen the app.
    The data in mobile does not update.
    Then I tried in unity packed mode,it works.

    Do I miss any setting in addressable?
    Does someone have the same issue?
     
    Last edited: Sep 17, 2019
  2. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    - Please enable log, otherwise it could be just random guessing.
    - Also disable cache in settings, so you actually test it in packed mode.
    - Manually test your catalog and bundle url would be helpful.
     
  3. jiahongzeng

    jiahongzeng

    Joined:
    Jul 24, 2019
    Posts:
    18
    The addressable log shows
    It shows when launch the app on mobile every time.
    It seems does not load or update catalog from remote server.
     
  4. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    Cloud you check your setting file? In the Library/com.unity.addressables/TARGETPLATFORM/settings.json (or something like that). A setting file shall contains your remote catalog path. Otherwise it’s a build issue.
     
  5. jiahongzeng

    jiahongzeng

    Joined:
    Jul 24, 2019
    Posts:
    18
    I update to version 1.2.4 and try again.
    But it still not works.

    Here is the catalog path data in settings.json.

    The catalog.json path seems set at {UnityEngine.AddressableAssets.Addressables.RuntimePath} not remote path.
     
  6. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    The setup seems ok.
    • AddressablesMainContentCatalogRemoteHash is the remote catalog.
    • AddressablesMainContentCatalogCacheHash is where the remote catalog downloaded to, if you start app without internet access, the cached one will be used.
    • AddressablesMainContentCatalog is the local catalog.
    Your log shows that it loads local catalog, then use it.

    In a successful remote catalog setup, you will see requesting and using remote catalog right after loading local catalog, as below.
    upload_2019-9-19_23-34-10.png

    I guess you shall test the reachability of AddressablesMainContentCatalogRemoteHash, in your browser. In most case, a hosting issue, or a miss-configured profile entries (RemoteBuildPath vs RemoteLoadPath) will cause the issue.
     
  7. jiahongzeng

    jiahongzeng

    Joined:
    Jul 24, 2019
    Posts:
    18
    I find something different from your log.Except the platform,my RemoteHash is empty.
    upload_2019-9-20_10-39-52.png

    Here is my settings
    upload_2019-9-20_10-43-4.png

    Do I miss something?
     
    Last edited: Sep 20, 2019
  8. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
  9. jiahongzeng

    jiahongzeng

    Joined:
    Jul 24, 2019
    Posts:
    18
    Thanks for the reply.

    The format of "myIP" is xxx.xxx.xxx.xxxx.
    Because I do not want to show the IP so I use the string instead.
    I am sure I switch the remote setting.Here is the setting.
    upload_2019-9-23_13-12-26.png

    The setting in addressable window
    upload_2019-9-23_13-13-16.png

    I retry whole steps today and the log still shows the empty string.
    The addressable will download bundles from remote but won't update the catalog and bundles from remote.
     
  10. MarcusKing

    MarcusKing

    Joined:
    Dec 5, 2018
    Posts:
    5
    Unless you "Override Player Version" to .e.g "1" (like Favo-Yang has) the catalog file name will be based on the time it was created (e.g. catalog_2019.09.19.02.08.00 instead of catalog_1). This means the original build will keep asking for the "old" catalog. Using the same filename for the catalog between updates means it will detect that it has changed and download the updated version.
     
  11. jiahongzeng

    jiahongzeng

    Joined:
    Jul 24, 2019
    Posts:
    18
    I set "Override Player Version" to 1 and change to 2 before build update content and still do not update catalog from remote.

    Does there has more detail for the work flow about update from remote on mobile.
    According to the document,it seems to enable the Build Remote Catalog and the system will update the catalog from the path.
    But it does not work.
    Maybe I missing a small setting which does not mention in the document.

    Thanks.