Search Unity

Wrong bucket path???

Discussion in 'Unity Cloud Content Delivery' started by Klausini, Sep 28, 2020.

  1. Klausini

    Klausini

    Joined:
    Feb 19, 2010
    Posts:
    37
    To start with: I have never worked with asset bundles or CDNs before. Be warned.

    I was able to create a bucket and a release via the CLI. Now, I want to download this again, but it seems I have a wrong/missing path. The link looks like:

    https://f91cbd2c-782b-491a-8740-382..._by_badge/latest/entry_by_path/content/?path=

    BTW, is this link sensitive information???

    When I click on the link in the browser I get:

    {"code":1,"details":["missing required parameter path"],"reason":"Invalid argument"}

    As a beginner to this I thought it would be a good idea to start with some of the shelve asset, so I got myself "Autobuilder". This seems to work fine, but with the above copy/pasted link from CCD to the config.json I get a console error: "Bootstrap: JSON parse error: Invalid value."

    The config.json is quite simple and should only link to the right CDN:
    {"cdnBundleUrl":"https://f91cbd2c-782b-491a-8740-382...by_badge/latest/entry_by_path/content/?path=/"}

    I assume the problem is with the given path from Unity CCD, but I have no idea how it should look like.

    Bonus question: Once this is solved what would be a good beginners alternative to fiddling with the CLI?
    Many thanks!
     
  2. timtunity3d

    timtunity3d

    Unity Technologies

    Joined:
    Oct 1, 2015
    Posts:
    130
    The link isn't sensitive information. Your API key is the main piece of information you don't want to post in the forums.

    Where are you getting that path? Are you generating it, or are you copying it from somewhere? It's expecting a parameter at the end of "?path=" like "?path=content.bin"
     
  3. Klausini

    Klausini

    Joined:
    Feb 19, 2010
    Posts:
    37
  4. timtunity3d

    timtunity3d

    Unity Technologies

    Joined:
    Oct 1, 2015
    Posts:
    130
    Ah ok. That's essentially a "base path" for Addressables to download individual files. You can't currently download all of the files you have uploaded as a bundle. I realize this is a little confusing. The content delivery service can host the Asset Bundles, but doesn't generate them. You can however download the files one at a time by putting their filenames at the end of the URL.

    To use the service for Asset Bundles you'll want to get Addressable Asset Bundles working locally.

    Unity Learn has introductory courses on this:

    https://learn.unity.com/project/getting-started-with-addressables

    https://learn.unity.com/tutorial/introduction-to-asset-bundles

    And then you can find more documentation in the Addressables manual on using a hosted asset bundle provider:

    https://docs.unity3d.com/Packages/com.unity.addressables@1.16/manual/index.html

    Once you're setup locally you should be able to upload the Asset Bundles you generate to the content delivery service, and we should be able to help you with any follow up questions on doing that integration.
     
  5. Klausini

    Klausini

    Joined:
    Feb 19, 2010
    Posts:
    37
    Many thanks for the links! I will read them (with a fresh mind).

    However, I want to use the Unity Asset Store Asset "Autobuild". This requires the root folder for the specific version where all my asset bundles are included. I can do this with my own FTP and it looks like:
    https://myserver.com/folder/

    So, this root folder would look something like this in Unity CCD (simply remove the last ID)?

    https://f91cbd2c-782b-491a-8740-38224389789a.cloudcontent.unity3dusercontent.com/

    Unfortunately, this is not working. It seems all files are "encoded" with a special file name. How do I get at least my manifest.json "unencoded" as a link? Current coded version:

    https://f91cbd2c-782b-491a-8740-382...c9c49a27-634c-4c02-a518-79802876b830/content/
     
    Last edited: Sep 28, 2020
  6. timtunity3d

    timtunity3d

    Unity Technologies

    Joined:
    Oct 1, 2015
    Posts:
    130