Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How to restrict updates to groups? Like as DLC

Discussion in 'Addressables' started by julio_kolbapps, Jun 25, 2021.

  1. julio_kolbapps

    julio_kolbapps

    Joined:
    Mar 2, 2021
    Posts:
    32
    I'm confused on how to proceed!
    I want to create a DLC style system. When my user purchases any updates, then he has access to download these updates The problem is that I don't understand how to restrict access to resources he has access to and not everything on the CCD…

    In my image below I have made a package that should contain all of my game's starting content. (StarterKit).
    Everyone has access to this package and I will maintain the automatic update system at the start of the application, to ensure that my users always have the correct updates for this package.
    So far everything is going well!

    Captura de Tela 2021-06-25 às 11.03.54.png

    The problem is that I will have other packages like this one in my image.
    For example:
    - SummerKit2021.
    - WinterKit2021…
    Etc...etc...

    Now comes the problem!
    If I use DownloadAsync(“weapon”) or LoadAssetsAsync<…>(“weapon”), … It will download and load everything that exists with the label weapon in any existing group. It doesn't matter if I want my user to receive updates only from the StarterKit group.

    I still don't understand how to go about separating this!
    In previous tests I've tried the following:

    1 - Application start, I update the catalog. (CheckUpdateCatalogue)
    2 - I check and update packages that need to be updated or that need to be downloaded. (DownloadAsync)

    I believe the answer must lie in these first steps.
    Maybe if I could restrict the DOWNLOAD to download only specific groups, in my case just the starterKIT. The problem is that I haven't seen how to do this yet. Currently my downloadAsync downloads everything on LABEL. If I tell him to Download weapon he will download weapons from all groups.

    Maybe it's done in the catalog then? Is the catalog that defines what DownloadAsync and LoadAssetsAsync will download? If so, I also don't understand how I can make my catalog just update groups that I want.. In my case, only the starterKIt… initially…
    Anyway. There are many doubts about this subject. I've been working on it for a few weeks and I'm going in circles...

    Can anyone help?
     
  2. julio_kolbapps

    julio_kolbapps

    Joined:
    Mar 2, 2021
    Posts:
    32
  3. Raghavendra

    Raghavendra

    Joined:
    Mar 14, 2014
    Posts:
    52
  4. julio_kolbapps

    julio_kolbapps

    Joined:
    Mar 2, 2021
    Posts:
    32
    Ty for repply @Raghavendra . But it doesn’t work for me!

    Packages will be added without knowledge of the main build. So If I need to add new tags every time I build a new package, I'll always need to update the main build together.

    For example. I have a UI that displays weapon images.
    - The user has the starter kit. So he only has these weapons in the UI arsenal.
    - After he acquired a new pack, it contains new weapons. Now the UI will show him more weapons.

    Note that the controller carrying these weapons carries the ARMA label. so he always knows when there are new weapons. New packages. with new weapons.

    If I need to create a new label, I will have to compulsorily prepare this controller to access this new label as well. So, I will have to update the BUILD of the game. This is unfeasible for my purposes.

    The initial doubt on this matter remains.

    I need to filter which packages the user has access through LABEL ARMA! for example!
     
  5. julio_kolbapps

    julio_kolbapps

    Joined:
    Mar 2, 2021
    Posts:
    32
    compared to the number of responses, I can get an idea of how complex this is for everyone.

    Please Unity, improve the examples with more different use cases. And also improve documentation.

    It's no use trading one solution for another and waiting for users to guess how it works!

    I'm disappointed in this.
    I'm finalizing the vertical slice of my product and I'm stuck with it to start the final production process.

    If you know the way to my question, please don't hesitate to answer.

    Thank you all!
     
  6. AdminXRBASE

    AdminXRBASE

    Joined:
    May 19, 2020
    Posts:
    18
    To my knowing, you'll probably have to use something like Remote Config to achieve what you want. Also, you cannot refer simply to a group: this mistake is something everyone makes, and is a very logical way of thinking.
    The easiest solution for you is to create labels for your DLC packages. So, Summer2021, Windter2021 etc. To make these labels dynamic, so you can update your assetbundles with new labels, you need a place where you can fetch your labels. The nicest implementation is using Remote Config: this way you can also hide content without touching code, while the content is already in place.
    But you can also make an array of strings in a ScriptableObject, that is addressable and use that list of labels. This way you can update your list of labels without touching your game code and use them dynamically.