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 Player Version Override doesn't work

Discussion in 'Addressables' started by kk3hi3123, Mar 18, 2022.

  1. kk3hi3123

    kk3hi3123

    Joined:
    Aug 17, 2016
    Posts:
    31
    Hello. I want to using the same remote path for old user and new user with different remote assets. And I found that there is a property called Player Version Override, which can be used to output a catalog.json with different version.
    My default value of Player Version Override is 1 and I guess this is the reason why the catalog file is named as catalog_1.json. I try to set it to 2 and "Update a previous build". But the output catalog is still called catalog_1.json and override my old catalog_1.json. Is it a bug or there is any setting mistakes?
     
  2. andymilsom

    andymilsom

    Unity Technologies

    Joined:
    Mar 2, 2016
    Posts:
    294
    This is intentional. When updating a previous build. It is expecting that the previous build settings is looking for the catalog at catalog_1. so in order for that Player build to correctly find the catalog it must be named the same.

    1. Make a new build
    - settings now point to <url>/catalog_1.json
    - release Player with settings.
    2. Make an update for that player build
    - the path the player is looking for the release must be the same in order to find it.

    A work around to this is to use { } brackets in the name. e.g. {CatalogVersion}. Then rename the catalog from catalog_{CatalogVersion}.json to catalog_1.json etc.
    Then in the code, before initialising Addressables. Set Addressables RuntimeVariable CatalogVersion to what you want.