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

Setup Questions

Discussion in 'Unity Cloud Content Delivery' started by c_andrews, Nov 20, 2020.

  1. c_andrews

    c_andrews

    Joined:
    Jan 26, 2015
    Posts:
    106
    Hi, I'm just trying to get my head around how things are all setup as I am a bit confused with it all.

    We have our project building using Cloud Build. I have setup the cloud build targets config with Content Delivery Enabled with the target bucket set to my bucket called "Development".

    I've now been able to manually upload my IOS addressable assets to my bucket "Development", this has then allowed me to create a Release and the Latest badge and get the remote path URLs: "https://XXXXXXXXX.client-api.unity3..._by_badge/latest/entry_by_path/content/?path="

    Do I use this URL as it is in the Addressable "RemoteLoadPath" of the Addressable profile?

    Do I need to setup different buckets for each target so "Development-ios" / "Development-android" so that I have different RemoteLoadPath?

    Would I then need to setup different Addressable Profiles for IOS and Android and target them in the Cloud Build "Addressable Asset Options" config for "Profile Name" e.g. a profile called "Remote-UCD-IOS"?

    If I am wanting to build and test a new version of my app and my live version is using the badge "Latest". Would I need to make a "Staging" badge and setup another Addressable Profile that the RemoteLoadPath points to "...release_by_badge/staging/entry_by_path..."?

    Sorry for all the questions just trying to make sure I understand how the workflow should work.

    Thanks in advance for any help.
     
  2. c_andrews

    c_andrews

    Joined:
    Jan 26, 2015
    Posts:
    106
    Hi @timtunity3d, is this something you are able to help guide us with?
     
  3. timtunity3d

    timtunity3d

    Unity Technologies

    Joined:
    Oct 1, 2015
    Posts:
    130
    I'm still learning the Addressables side of things as well...

    But yes, it's my understanding you use the URL you specified as the "RemoteLoad Path".

    >> Do I need to setup different buckets for each target so "Development-ios" / "Development-android" so that I have different RemoteLoadPath?

    I think this is up to you. I think you can upload all your platforms into the same bucket, or have a different bucket per platform. In all the tutorials I've seen all your platforms in the same bucket.

    But I went and looked at CloudBuild and it uses the --delete flag when uploading files. So if you had a iOS asset bundle target and an Android asset bundle target both pointing at the same bucket they would end up deleting each other's files. So I think for now with CloudBuild you need to do development-ios, development-android, etc.

    >> If I am wanting to build and test a new version of my app and my live version is using the badge "Latest". Would I need to make a "Staging" badge and setup another Addressable Profile that the RemoteLoadPath points to "...release_by_badge/staging/entry_by_path..."?

    That's my understanding of the best practice, yes. So you would have a Staging build with that staging URL compiled in, and a Development build with the development URL compiled in. Ultimately our goal would be to use a tool like Unity RemoteConfig to be able to switch the URL dynamically based upon the User playing or the network (like you could allow list your testers or people on your company Intranet).

    We're hoping to get a lot more detailed documentation and best practice information in future months, so we really appreciate questions like this. Feel free to ask me if any of this isn't clear/working.
     
  4. c_andrews

    c_andrews

    Joined:
    Jan 26, 2015
    Posts:
    106
    Thanks @timtunity3d, I've managed to get a bit of a pipeline going with Cloud build telling the app which bucket and badge to use. However when the app is launched and it tries to load the remote asset, I get a 404 HTTP error. I've checked the Project ID, the Bucket ID and the Badge in the url and it all seems correct so i'm not really sure why its failing.

    The latest badge is assigned to the most recent release in the target bucket. Im assuming everything in the bucket is public. Any ideas what might be going on? Am I missing something?
     
  5. timtunity3d

    timtunity3d

    Unity Technologies

    Joined:
    Oct 1, 2015
    Posts:
    130
    That all sounds correct. Do you have an URL that it's querying you can share?
     
  6. c_andrews

    c_andrews

    Joined:
    Jan 26, 2015
    Posts:
    106
  7. c_andrews

    c_andrews

    Joined:
    Jan 26, 2015
    Posts:
    106
  8. timtunity3d

    timtunity3d

    Unity Technologies

    Joined:
    Oct 1, 2015
    Posts:
    130
    That's correct. For others who may read this looking for the same info. These URLs are also provided on your bucket page on the "Addressable Remote Path URLs" tab.