Unable to build Addressables after upgrading to Unity 6

Hey everyone,

I’m trying to upgrade from Unity 2021.3.28f to Unity 6, but I’m running into this error when trying to build Addressables.

Built In Data does not have any associated AddressableAssetGroupSchemas. Data from this group will not be included in the build. If this is unexpected the AddressableGroup may have become corrupted.

Someone asked a similar question here already, but unlike them, my Addressable groups are still fine. How should I get this to work? Redoing all Addressables, as some have suggested, is out of question, as I have localized the game for 6 languages and there’s a lot of text and voice overs.

By that do you mean they all have properly-set-up schemas??

If so, you might try reimporting one of the Groups (or the Schemas) to see if it gets happier.

Otherwise, as is always the case with Addressables, multiple reimports, blowing away Library/ folder, etc., generally will eventually make it happy again, assuming everything was already set up.

Huh, thought I wrote about the Built In Data still missing it’s script reference, but I guess that was left out. So there is definitely something amiss, so I’m not sure if reimporting does the trick. I already reimported everything after upgrading, as some files seemed to break.

Can I just delete Library? It would probably be a good idea in any case, seeing it takes around 23 gigabytes when the game is under 1 GB when built.

Tried deleting Library, but it didn’t help with the missing script reference. Building the Addressables only gives a warning about that missing script, but end up building nothing anyway. Help would be appreciated, I have no idea how to proceed.

As with all engineering issues, break stuff apart, simplify simplify simplify.

I would make a new project and open it with the version of U6 in question, and feed it the Packages/manifest.json you’re using in your project.

Now drop in a single image, mark it as an addressable and build addressables.

If it fails you’re done. File a bug with Unity and go back to the previous functioning version.

If it works it is time to bisect towards your actual project.

We’ve gotten rid of support for Built-In Data in the 2.x stream. The group was meant to temporarily help with migrating away from Resources. If you don’t need the legacy Resources functionality you should just be able to delete the Built-In Data group to fix the issue.

If you still need the functionality, I’d suggest downgrading to 1.23.1. You can do that by choosing “Install by Name” from the package manager and choosing “com.unity.addressables” and version 1.23.1.

Let us know if that doesn’t solve the issue.

I am indeed still using the Resources system. I tried downgrading Addressables to said version, but now I’m getting new errors.

Build Task CreateBuiltInShadersBundle failed with exception:
Object of Type UnityEditor.Build.Pipeline.Interfaces.IBundleExplictObjectLayout was not available within the BuildContext
  at UnityEditor.Build.Pipeline.BuildContext.GetContextObject (System.Type type) [0x00033] in .\Library\PackageCache\com.unity.scriptablebuildpipeline@101dcb4353ce\Editor\Shared\BuildContext.cs:125 
  at UnityEditor.Build.Pipeline.BuildContext.GetContextObject[T] () [0x00000] in .\Library\PackageCache\com.unity.scriptablebuildpipeline@101dcb4353ce\Editor\Shared\BuildContext.cs:113 
  at UnityEditor.Build.Pipeline.Tasks.CreateBuiltInShadersBundle.Run () [0x0004a] in .\Library\PackageCache\com.unity.scriptablebuildpipeline@101dcb4353ce\Editor\Tasks\CreateBuiltInShadersBundle.cs:55 
  at UnityEditor.Build.Pipeline.BuildTasksRunner.Run (System.Collections.Generic.IList`1[T] pipeline, UnityEditor.Build.Pipeline.Interfaces.IBuildContext context) [0x0009d] in .\Library\PackageCache\com.unity.scriptablebuildpipeline@101dcb4353ce\Editor\Shared\BuildTasksRunner.cs:56 
UnityEditor.GenericMenu:CatchMenu (object,string[],int)
SBP ErrorException
UnityEditor.GenericMenu:CatchMenu (object,string[],int)

Seeing as it mentions the Library, I already re-deleted that, but it made no difference. I have also reverted to the localization asset files used before the change in version, same story.

Can you revert your code to the state before the upgrade? If not, what version of Unity are you using?

I can yeah. Should I give up on Unity 6, or try upgrading differently? I was using 2021.3.28f previously, but since I needed an update anyway to enable Android 14 building, thought I’d try the newest first.

I’ve finally got the Unity 6 build without errors, after getting rid of the Resources system. Now, however, in browser, the game can’t load localized audio. I ran into the same problem with Unity 2022 and Addressables 2.x.x it was using. Has something changed in either package in between the versions? I get the following errors:

System.Exception: Unable to load dependent bundle from location Assets/Sounds/Planet Scene Audio/English/Globe introduction-00.wav
Unity6Test.framework.js.gz:9:35019
OperationException : Failed to load sub-asset from the address a35c6a8e00f5ceb47aac404c9d54f675.
Unity6Test.framework.js.gz:9:35019

Is it trying to load the asset bundle from such place, or is the wording incorrect, and it just means it can’t find such file in the assetbundle? That path is correct in the Unity project’s hierarchy. It can also load the localized text just fine.

What version of Addressables and Localization are you using? Can you try using Addressables 2.4.1 and see if it resolves the problem?

You can install it in Package Manager with “Install by Name”

com.unity.addressables
2.4.1

At a glance, upgrading to 2.4.1 seems to have fixed everything. Even the Built In Data looks like it could be working (no missing scripts), did this make a comeback? I guess I’ll still migrate to Addressables completely soon, as there’s no guarantee Resources will keep working in the future.

That is a horrible reason to switch. Resources has been around a LOT longer than Addressables and is at least 100x or even 1000x more stable and simple to use. It’s used everywhere in sample code.

Resources has been in use for decades and is also in use in core Unity UGUI and TextMeshPRO packages presently, and while that COULD go away, I doubt it.

Because I use source control, I constantly see bugs in the produced work datastream coming out of Addressables, such as yesterday whe items originally placed in Group1 suddenly now appearing simultaneously in Group1 and Group2 databases, yet showing in Group2 database, and showing up in the window as Group1… just bugs bugs bugs requiring me to reset and retry, which magically makes it work properly.

I also see people struggling with all kinds of Addressables bugs in this forum. That’s why I wrote this hand-holding info about Addressables:

At this point I’m a few months away from our next to shipping date and if I have to, I am prepared to rip out 100% of my Addressables use and switch to Resources.Load() in a heartbeat, otherwise I would have to explain to people who give me money that I can’t get something to work.

3 Likes