Is there a way to remove the appended words from Addressable Bundle names?

Hey Everyone,

Hopefully someone can help me out with this issue I’m having with our project’s bundle names.

Anytime we make a new addressable content build, the names generated for our bundle files appear like this:

  • e4h_scenes_all.bundles
  • resac_assets_all.bundles
  • heatpump_scenes_all.bundles
  • etc.

But our desired output is this:

  • e4h.bundles
  • resac.bundles
  • heatpump.bundles
  • etc.

I believe I have my addressable group settings set up correctly by having the ‘bundle names’ property set to “Filename”
8743017--1184106--2023-01-19_10h20_40.png

I also manually simplified the bundle name in the addressable group window.

I’ve been using the analyze tool’s Bundle Layout preview to check if the name would change if I selected a different the bundle name setting, but surprisingly the name remains the same.

I’ve tried deleting the groups and recreating them but that yielded no results.

Anyway to fix this from the editor? I don’t want to have to programmatically rename the bundles and change their addresses in the settings.json/catalog.json files after a build is created since that can introduce other potential errors.

Currently using:
Unity Version 2020.3.42f1
Addressable Package Version 1.20.5

Bump. Anyone have any suggestions?

The reason for this is that you can put regular assets and scenes in the same group, but these can’t resided in the same output bundle. So Addressables splits these between assets_all and scenes_all. This is a limitation of the asset bundle system Addressables is using underneath.

Apart from the settings (that you’ve already found), there’s no other way to change these names. If you desperately want them to be the way you want them, I’m afraid you’ll have to dive into the code and change this out, also making sure you don’t end up with a collision due to the aforementioned detail about assets and scenes in the same group.

1 Like

Thank you for the response @LuGus-Jan . I was concerned that I would be the case. Am still a little confused about your first point though:

Please correct me if I’m wrong but let’s say I have an addressable group named “MainScene.” Inside of that group I have a unity scene - also named “MainScene” - and all the assets that are included in that scene. For example:

  • Addresssable Group: “MainScene”

  • MainScene.unity

  • someMesh.fbx

  • someTexture.png

  • someSFX.wav

  • etc.

Does this mean that when an addressable bundle is built for this target group, the output bundle (MainScene_assets_all.bundle) will only store the asset files and not the scene file? If that’s the case, where is the scene file saved at? Thanks in advance.

It will create 2 bundles: MainScene_scenes_all.bundle (which contains the scene(s)) and MainScene_assets_all.bundle (which contains all other types of assets).

1 Like

Interesting… I was under the impression that it’s good practice to include the asset files in the addressable group with the corresponding scene file - but that’s optional.

My original group layout only included the scene file because the required sub-assets were implicitly referenced in the bundle. The original group layout was like this this:

  • Addresssable Group: “MainScene”

  • MainScene.unity (Explicitly)

  • someMesh.fbx (Implicit)

  • someTexture.png (Implicit)

  • someSFX.wav (Implicit)

  • etc. (Implicit)

Does this mean that those sub-assets are not in the final “MainScene_all_scenes.bundle” after its built?

Really appreciate your responses @LuGus-Jan . This is very helpful.

That’s actually something I’m not sure about. I guess it’s easy to try out. If you have just that group (MainScene) with only the explicit asset entry of the scene, and make a build, does it show both ‘MainScene_scenes_all’ and ‘MainScene_assets_all’ bundles? If so, I think you can be pretty sure that it contains those implicit assets.

1 Like

@LuGus-Jan so I was able to spend some time last week experimenting with our bundle layouts. I think there was some confusion about explicit and implicit assets.

After what you mentioned, I was concerned that our original layout setup (the one described in my previous post) was only bundling the scene and none of the scene’s dependent assets. I looked through the documentation again, and did some load tests for one of the project’s scenes, and can confirm the scene and its dependent assets are both stored in the single bundle (MainScene_scenes_all.bundle).

If I had set the “addressable” property for those dependent assets to true, that would’ve made the asset an explicit reference, which would trigger Unity to create separate asset and scene bundles as you mentioned before.

@davidla_unity it would be nice if we had the option to remove the appended string from a bundle name if we’re implicitly referencing dependent assets in an addressable group. Appending _scenes_all doesn’t make sense in this case because the bundle consist of one explicit scene file and the rest are just implicitly referenced asset files. It’s confusing and misleading given the mixture of assets.

For the time being I will move forward with the solution I previously mentioned. My question for @davidla_unity and the unity addressable team is if there are any other files that store a reference to the original bundle name outside of catalog.json? Also, what possible collisions can occur for changing the bundle name during the post-build (or post-export) process that aren’t immediately recognizable? Thank you.

Hi @cengage-jsal thanks for the feedback! I would suggest posting your suggestion to our public roadmap, under the runtime management tab Content pipeline and package management roadmap | Unity. As mentioned earlier, scenes are packed differently from regular assets, and so scenes and their implicit dependencies must be packed separately from other assets.

The bundle filename is used in the catalog.json and the addressables_content_state.bin (used for content updates). Internally bundles used a different identifier, which we refer to as the “Internal Bundle Id”. This is used by the bundle cache and how bundles reference each other. So I think it’s possible to write a custom build script that renames the bundle filenames without much issues.

1 Like

Hey @pillakirsten ! Thanks for getting back to me (and sorry for the late reply). I managed to find another solution that didn’t require making any changes to the names of the bundles after their built.

I ended up creating new labels based off our original bundle names and assigned those labels to their corresponding addressable scene group. This method has been working perfectly with our project’s current bundle loading system.

Thanks again!