Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to download files linked to cloud content delivery badge

Discussion in 'Unity Cloud Content Delivery' started by unity_8V7eqrcMpU44sw, Aug 19, 2022.

  1. unity_8V7eqrcMpU44sw

    unity_8V7eqrcMpU44sw

    Joined:
    Jan 17, 2022
    Posts:
    6
    Currently, when downloading using the Addressables.DownloadDependenciesAsync function, only the latest file seems to be downloaded.
    How do I download the badge file set in the remote load path in the addressable profile setting?

    The code below is the remote load path path I set
    You have completed the value for {}

    Code (CSharp):
    1. "https://{projectID}.client-api.unity3dusercontent.com/client_api/v1/environments/{environmentName}/buckets/{bucketID}/release_by_badge/{badgeName}/entry_by_path/content/?path=";
    2.  
     
  2. ryan_ngo

    ryan_ngo

    Unity Technologies

    Joined:
    Feb 2, 2021
    Posts:
    35
    Hi! Could you elaborate more on what you mean by the latest file. Do you only mean one file? It could be that the file you're downloading from has no dependencies so it is only grabbing the necessary asset bundle to download.
     
  3. unity_8V7eqrcMpU44sw

    unity_8V7eqrcMpU44sw

    Joined:
    Jan 17, 2022
    Posts:
    6
    Latest file refers to the latest uploaded build
    latest build

    I'll explain an example in a png file.

    RemoteLoadPath has set the Addresables URL to load customBadge normally.
    I want to download the release file assigned to customBadge
    If you look at the example of the current png file, the file from release 57 should be downloaded, but the file from latest i.e. releast 59 is still being downloaded.

    The difference between latest and customBadge's bundles is
    One game object is designated as an address asset
    In latest build, the name of the game object is saved as latest, and in customBadge, the name of the game object is saved as customBadge.

    I was wondering if the file assigned to release 57 would be downloaded if I set the loadPath to a customBadge Addressable URL.
    If that's the case, I'd like to know what settings or code I need to add.
     

    Attached Files:

    Last edited: Aug 23, 2022
  4. ryan_ngo

    ryan_ngo

    Unity Technologies

    Joined:
    Feb 2, 2021
    Posts:
    35
    Are you referring to the the Addressables catalog? the catalog.json that is built when you upload a release? Anything that is built within that particular build of Addressables would be referenced in that catalog and so it should be downloaded if it's catching the right catalog. Are you building the catalog and uploading that with the release?
     
  5. ryan_ngo

    ryan_ngo

    Unity Technologies

    Joined:
    Feb 2, 2021
    Posts:
    35
    You'll want to build the remote catalog similar to this but with the reference to your remote location
     

    Attached Files:

  6. unity_8V7eqrcMpU44sw

    unity_8V7eqrcMpU44sw

    Joined:
    Jan 17, 2022
    Posts:
    6
    In the case of the current addressable settings, all settings are considered to be normal, so please review the png file below.

    There are few related references, so I would like to get help on whether a separate setting is necessary
     

    Attached Files:

  7. ryan_ngo

    ryan_ngo

    Unity Technologies

    Joined:
    Feb 2, 2021
    Posts:
    35
    Apologies for all the questions, though when building and creating a new release are you "Updating a previous build" or using the "New Build" Option in Addressables?
     
  8. unity_8V7eqrcMpU44sw

    unity_8V7eqrcMpU44sw

    Joined:
    Jan 17, 2022
    Posts:
    6
    - Update a previous build function was used
    - I used the Build and release function

    1. Specify RemoteTest_customBadgeprefab as an addressable asset
    2. CCD.produce RemotePath.Set to Android.customBadge
    3. Run updated a proactive
    4. Run Build & Release
    5. Check if Content Delivery Bucks have been updated
    6. Download GameObjectLabel
    7. Confirm the creation of the RemoteTest_customBadge object in Hierarchy

    8. Specify RemoteTest_Latest_Release 75 prefab as Addressable Asset
    9. RemotePath to CCD.production.Set to Android.latest
    10. Run updated a proactive
    11. Run Build & Release
    12. Check if Content Delivery Bucks have been updated
    13. Download GameObjectLabel
    14. Create RemoteTest_Latest_Release 75, RemoteTest_customBadge object in Hierarchy

    15. RemotePath to CCD.production.Set to Android.customBadge
    16. Download GameObjectLabel
    17. Create RemoteTest_Latest_Release 75, RemoteTest_customBadge object in Hierarchy

    In the 17th step, I think only RemoteTest_customBadge should be downloaded and created, but RemoteTest_Latest_Release 75 is also downloaded.

    I wonder why RemoteTest_Latest_Release75 prefab is also downloaded when only RemoteTest_customBadgeprefab is designated as an addressable asset in the file linked to customBadge (Release 74).

    The same phenomenon occurs when you use the Build & Release function alone without using the updated a proactive function.

    I attached the settings related to the test environment and the screenshot of the code used when downloading.
     

    Attached Files:

    Last edited: Aug 25, 2022