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 New to CCD -> Questions

Discussion in 'Unity Cloud Content Delivery' started by PeachyPixels, Sep 13, 2022.

  1. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    704
    Hello!

    I've just started to implement CCD into my latest game and day one progress was fairly productive, but do have some questions\observations.

    1) I'm using UnityServices.InitializeAsync(<options>) to set the environment. As far as I can tell, all UGS services appear to honour this (meaning it only needs to be called once) but CCD isn't. If CcdManagement.SetEnvironmentId(<id>) isn't called directly it fails (and doesn't even appear to use the default dashboard development environment)

    2) I'm currently calling CcdManagement.Instance.GetContentAsync(bucketId, entryId) on game start to obtain a stream to the content, then writing the stream to a local file. Great! But how do I detect if this file has been updated? I obviously only want to download the file if it's unchanged (so it doesn't count towards the quota)

    3) The bucket is marked as private and I've created an access token, but it's possible to access the entry\content without specifying the access token \ authorisation header. Looking at ICcdManagementServiceSdk I can't see anything obvious as to why it doesn't need to be specified. Which is a worry.

    I've looked at the online docs and they're either outdated or not overly helpful (sorry) so any help would be much appreciated.

    This is using Unity 2020.3.38f1 & CCD 2.1.0

    PS: On a side note, the package name of CCD Management might be better called something like Unity Cloud Content Delivery instead. It isn't widely referenced and wasn't easy to find.

    PPS: I'm not using addressables, instead rolling my own content packs.
     
    Last edited: Sep 13, 2022
  2. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    704
    Hello!

    Some progress this morning...

    I now see that GetDiffEntriesAsync is used to answer question 2. I'm seeing the entries and their statuses then using GetContentAsync to update if required. I haven't tested beyond that, but it's progress.

    That said, after looking again at CcdSampleWindow it's really in need of expanding. Most of the CRUD operations are covered, which is good. But in reality, I expect most developers will use the dashboard or cli to perform these operations.

    What it's really missing are a number of the core calls that I suspect developers will use more frequently. That is, determining content that has changed and how to update said content.
     
  3. dpetitclerc

    dpetitclerc

    Unity Technologies

    Joined:
    Sep 1, 2021
    Posts:
    3
    Hi @PeachyPixels !

    For your first point, CcdManagement.SetEnvironmentId(<id>) should not be required as it should default to the production environment. We'll start an investigation on it and open a bug if this is not the case.

    An access token is also needed to access private bucket content via the client API. Could you give us more details on the requests you're making to access private buckets' entries/content without the token/header?