Search Unity

[BUG][CASE 1178293] Chained addressables build by switching platform doesn't work.

Discussion in 'Addressables' started by aurelien-morel-ubiant, Aug 21, 2019.

  1. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    Hello @unity_bill , sorry to bother you again but we found another issue with the Addressables and our automation system.
    We found a workaround for now but a bug fix could be better :D

    You can find the bug report extract below just in case someone have the same issue (in this way he can see a ticket already exit).

    What happened :
    The addressables system doesn't work as expected when you switch platform between addressables build content

    How we can reproduce it using the example you attached :
    In the sample project, we implemented 2 editor methods to reproduce the issues.
    Failure Asset Build : This will use your common logic by passing "[BuildTarget]" in the RemoteBuildPath and in the RemoteLoadPath and letting your AddressableSettings / AddressableDataBuilder managed it. This case failed always when we switched platform just before performing it.

    Success Asset Build : This one will use our logic by replacing the "[BuildTarget]" ourselves with the "EditorUserBuildSettings.activeBuildTarget" as we thought you were doing. But it seems not because in that case it works and it will replace every [BuildTarget] everywhere.


    This cause 2 issues in fact :
    1) Generated assets are generated in the Unity's first platform folder. If you are on Android for example. You will have "ServerData/Android" for all catalog and bundles generated.

    2) The catalog.json generated will have its content broke cause every addressables bundle will have a link with the format "URL/FirstPlatform/Whatever" instead of "URL/CurrentPlatform/Whatever".


    Hope this project will be enough to helping you to reproduce it.

    Thanks,
    Aurelien.
     
    Last edited: Aug 21, 2019
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Thanks for the bug report. I'm mostly sure this is due to us caching evaluated variables. The cache is there so that the UI isn't doing a ton of reflection every single re-draw. We're gonna put in something to clear that variable/reflection cache just before a build. I think.

    In any case, thanks for the bug report, that's always a huge help.