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

Bug Addressables doesn't create required bundles on remote build

Discussion in 'Addressables' started by paulgullettMR, Sep 20, 2022.

  1. paulgullettMR

    paulgullettMR

    Joined:
    Jun 23, 2019
    Posts:
    13
    I have logged a bug (IN-17220) but I can't believe I am the only one seeing this.

    Unity 2021.3.9f1 with Addressables 1.19.19 only creates the json and hash files in the ServerData folder.

    To demonstrate use the Addressables-Sample on github

    https://github.com/Unity-Technologies/Addressables-Sample

    Use Scene Loading in basic and try to build remote content.

    Works in 2020.3
     
    LorisToia likes this.
  2. paulgullettMR

    paulgullettMR

    Joined:
    Jun 23, 2019
    Posts:
    13
    Ok not sure whether this is by design or a bug. However, setting the remote build path in the profile doesn't appear to change where new packed assets get built, for that, you have to go to the settings for that new set of packed assets (Assets/AddressableAssetsData/AssetGroups) and set the Build and load paths there too.

    Note that if you ask Analyzer to fix stuff it will build a new asset group that also needs fixing.
     
  3. LorisToia

    LorisToia

    Joined:
    Jan 21, 2021
    Posts:
    14
    I'm having the same issue. bundle is created only first time, all the updates previous build and creating a new build (after the first one) doesn't create the bundle file, only hash and json.
    Any news? I'm on 2021 lts too
     
  4. shlakva

    shlakva

    Joined:
    Oct 15, 2017
    Posts:
    15
    I've just set 'Include in Build' option and file appeared under 'ServerData/Android'. LOL upload_2022-12-1_15-10-47.png
     

    Attached Files:

  5. dominik_calystral

    dominik_calystral

    Joined:
    Feb 23, 2023
    Posts:
    1
    I have the same issue, even though "include in build" is checked. anything else that is missing here? I use unity 2021.3.16
     
  6. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    114
    Faced with the same problem, try to make a build of the game itself and see if there are any errors in the console that need to be fixed, it helped me)
     
  7. npatch

    npatch

    Joined:
    Jun 26, 2015
    Posts:
    227
    I hit the same problem too. I have a project that is more or less standalone(in that I need to be able to produce standalone builds with its content) but its content has to be accessible from a Launcher project where a menu can open multiple such projects and load them all from bundles, which is where I hit this issue and I only get the catalog and hash in the Launcher project while the bundles themselves remain the sub project's Library folder.

    To do so, you have a Profile where the Remote points where you want, by any means (url, absolute path, relative whatever). In Addressable Asset Settings (Addressables Window-> Tools -> Inspect System Settings), you set that profile in the Profile To Use so the rest of the settings within this scriptable (and more*) can reference those build/load pairs.

    To load the bundles, you also need a catalog, so Build Remote Catalog needs to be checked and its Build/Load pair should be the Remote one. This handles putting the hash and catalog json in the remote path.

    Then in Update Previous Build section, you set Content State Build Path to the same remote pair so that the content state bin is also present (this is optional, but you don't have to always set the .bin file manually when performing Update Previous Build and I can remove it from build in the Launcher project).

    (*) So far we've covered everything, but the bundles themselves. Each group defined for Addressables has its own settings scriptable under Assets/AddressableAssetsData/AssetGroup, namely AddressableAssetGroup file. At first they probably have no override and basically reference top level settings, so they default to Local paths for build from the same profile we set before (which I initially had completely ignored). One solution is to add the same Local.BuildPath as the Remote. Another in case you want more fine grained control is to add the Content Packing & Loading Schema in each group's AddressableAssetGroup scriptable. There you can configure more things for each group including how to compress etc. I had added these schemas trying to figure out things like setting bundle names to just a filename without hashes and guids. At the top of the schema you can specify the Build&Load pair for this particular group (e.g. DefaultLocalGroup is local, but each other bundle is a dlc and therefore uses Remote). This setting is what governs where the .bundles go.

    If you forgo the AddressableAssetGroup override schema, the Local pair should control the bundle location. If even that doesn't work, the it's probably a bug.

    UPDATE: Looking at the Basic/SceneLoading project that the OP mentioned, unless they messed wtih the Local paths as well, the AddressableAssetGroup for the DefaultLocalGroup has a custom pair in the schema override which uses the local build and local load paths. So no matter what one did in the Remote paths, the .bundle would always be in the Library and copied over if you build a player, but the catalog, hash and state bin could very well be in Remote.
    upload_2023-9-20_14-12-11.png

    upload_2023-9-20_14-12-32.png
     
    Last edited: Sep 20, 2023