Search Unity

Prepare for Content Update: Can't find any changed assets at all, how does this work??

Discussion in 'Addressables' started by borispavlov0, Jan 20, 2019.

  1. borispavlov0

    borispavlov0

    Joined:
    Apr 19, 2015
    Posts:
    2
    I am able to build my first content into bundles. Then I build a player and try to edit some prefabs colors (ex. Change one cube to green). I try to click on "Prepare for Content Update" and locate a copy of my addressables_content_state that was used with the build. However, nothing is shown ever as different. That window always stays blank. I have tried to also completely change the prefabs, but still nothing shows up there as different.

    How does this work? Has anyone ever gotten it to work? I tried following the same steps as the 2019 presentation video, but no luck. I also have mixed success with the Build Player Content. Sometimes, the materials don't get bundled.

    Thank you
     
  2. rachelgarza

    rachelgarza

    Unity Technologies

    Joined:
    Jun 6, 2017
    Posts:
    29
    Hey, seeing if I can reproduce this now.

    Have you marked the Static Content checkbox for the group you're trying to get updated content from?

    Screen Shot 2019-01-23 at 10.50.02 AM.png

    If you mark that then Prepare for Content Update, you should see your changed assets in the Content Update window. Let me know if you've already tried this though and it's still not working for you. Have been seeing a lot of questions/comments around content updates lately, it's very possible we need to update the documentation for everyone. :)
     
    Last edited: Jan 23, 2019
  3. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    @rachelgarza

    Changes not detected for us: Platform Switch, Profile Switch (this is not an asset change, but would require to rebuild a previously build changes for the next platform - copying the content state bin after each build to avoid overwriting is a workaround here). Changes to [Variables] profile variables ([UnityEngine.Application.version] -> changing the version is only updated once you restart the editor).

    Changes to Adressable Asset Groups: Changing anything not directly to adressed asset, e.g. Adressable AssetReference[] => add/remove one entry is not detected
    upload_2019-1-23_17-58-28.png
    Where each entry is a Scriptable Object *.asset
    upload_2019-1-23_17-59-2.png

    The *.asset containing the SceneReference[] references is itself addressable. The SceneReference is a wrapper to hold addressable scenes.

    Code (CSharp):
    1.     public class SceneReference : ScriptableObject
    2.     {
    3.         [FormerlySerializedAs("Asset")]
    4.         public AssetReference AssetReference;
    5.         // other meta information, e.g public string Name;
    6. }
    The idea is to add a scene to an asset bundle via Content Update. No change to anything in that chain is detected by the addressable asset system Content Update Workflow.

    upload_2019-1-23_18-18-20.png
    Scenes holds only Addressable Scenes as there are many reports that mixing them breaks asset bundles. Scenes is static itself and set to pack separately. The scenes in there are referenced by SceneReference.AssetReference.

    Essentially:
    • UPDATE of an addressable is usually almost always detected. Changes to an adressables dependencies are usually detected if the dependencies are not addressable itself and are not ScriptableObject *.assets.
    • ADD, REMOVE something to/from an Addressable Group or creating new groups or changing keys or changing labels is not handled correctly in all cases.
    Changing assets: Changes in dependencies (e.g. changing a value from a referenced Scriptable Objects *.asset) is not detected.

    Just to name a few. None of those is detected (static:true).

    Have not tested more complex scenarios. As long as it fails to reliably detect changes to *.asset and AssetReference[] and ScriptableObject[] it is not usable for us.
     
    Last edited: Jan 23, 2019
  4. rachelgarza

    rachelgarza

    Unity Technologies

    Joined:
    Jun 6, 2017
    Posts:
    29
    @MNNoxMortem I see, thanks for clarifying that. I've discussed your scenarios with the team. We're going to work on getting some of these cases fixed soon (hopefully in the next release, but I or Bill will update in the forums when it is fixed either way).
     
    MNNoxMortem likes this.
  5. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    @rachelgarza Thank you a lot and send some kind words to the team for us :)
     
    Last edited: Jan 23, 2019
  6. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    One thing I've found out working through the Unity Bug Reports: You need to ensure dirty assets are saved (CTRL+S) before any change is detected. Therefore the following I've written above is not true and actually works:
    • Changing the size of an Array of Scriptable Objects
    • Changing the value of a scriptable object
    Changes will not be detected until you press CTRL+S. However, once you saved the change, it will be detected.
     
  7. locbh

    locbh

    Joined:
    Sep 11, 2017
    Posts:
    10
    I couldn't see the StaticContent update anymore.
     
  8. locbh

    locbh

    Joined:
    Sep 11, 2017
    Posts:
    10
    I just found out that you guys changed to:
    Can Change Post Release
    Can't Change Post Release
    That's so confuse for me
     
    Ben-BearFish likes this.
  9. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    @locbh Thanks for pointing this out. I've been frustrated about finding out what is static and not, but you made me realize they relabeled it. It'd be nice if in the documentation they said this. @unity_bill Could you have someone update that in the docs? It's not obvious.