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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more..
    Dismiss Notice
  3. Dismiss Notice

Question How to create new player build which rebuilds static contents from addressables_content_state.bin?

Discussion in 'Addressables' started by jacky-kschou, Jul 28, 2021.

  1. jacky-kschou

    jacky-kschou

    Joined:
    May 4, 2013
    Posts:
    73
    Hello,

    I want to create a new player build (for example .apk) that is updated from addressables_content_state.bin.

    But when I do a "Update from previous build", only the remote assets gets updated, but the static content (local bundles which lives in the Library/com.../aa/Android folder) did not get rebuild (coz I clicked clean build before so it was emptied).

    How to rebuild the static content so that the new player build is based on the old addressables_content_state.bin build also has the local static contents?

    Thank you very much.
     
  2. Jonas-Neuston

    Jonas-Neuston

    Joined:
    Jun 10, 2017
    Posts:
    70
    @jacky-kschou I think the idea is that addressables_content_state.bin is a sort of snapshot of what went into the last "New Build". This could be considered shipped/deployed/live.

    When you click "Update a Previous Build" that addressables_content_state.bin file is then used as an input to validate if content updates can safely be made on top of what's already shipped/deployed/live.

    So I don't think you can build static content form the addressables_content_state.bin file. I think you need to make a "New Build" which will create a new addressables_content_state.bin file.
     
  3. jacky-kschou

    jacky-kschou

    Joined:
    May 4, 2013
    Posts:
    73
    Hi Jonas-Neuston thanks for the reply. In this case, is there anyway that we can make the "New Build" (which is not based on the previous addressables_content_state.bin) to somehow linked to the catalog hashes of the previous Build. So when the player update their app version to this "New Build", they don't need to redownload all the assets that have already download before?

    Thank you very much.
     
  4. Jonas-Neuston

    Jonas-Neuston

    Joined:
    Jun 10, 2017
    Posts:
    70
    I don't have any experience with that so I can only speculate here. My guess would be that if you make a "New Build" and you haven't changed any assets or moved around things in the groups, you should end up with the same hashes for the bundles, which I would then also assume would let the users keep the assets in their cache and not force them to redownload them. But then again, I don't have any practical experience with exactly your situation.
     
  5. Jonas-Neuston

    Jonas-Neuston

    Joined:
    Jun 10, 2017
    Posts:
    70
    If you'd want to validate the idea that two subsequent "New Builds" with the same assets and groups should look the same, I guess you could do an experiment:

    Make a "New Build", move the output files out to another folder, and then make another "New Build" and compare the two folders to see if you get the same files with the same names and content.
     
  6. jacky-kschou

    jacky-kschou

    Joined:
    May 4, 2013
    Posts:
    73
    Thanks for the reply, that's what I assumed too, but I tested out the new player build requires to redownload all the remote bundles...