Building addressables in different machines

Is there a way to build Addressables in different machines (different PCs) without breaking the last build?

For example, for android:

we build an app version 1 and build Addressables in machine A.
install app in mobile A and upload bundles and catalog into the server.
Everything works fine.

we build app version 2 and “Update” addressable in Machine B.
install app in mobile B and upload bundles and catalogs overwriting the last one.
Now, mobile B runs the App fine, but version 1 in mobile A stops loading the bundles.

Any help?

I’m going to forward this one over to the team for some guidance. In case they ask, which version of Addressables are you working on?

@TreyK-47 I created addressables on machine 1 then I commited the project in collab then my teammate downloaded the same project on machine 2 .After testing on android version my teammate cannot load the addressables.I am using the following code to download the asset and instantiate them.

AsyncOperationHandle<GameObject> loadWithSingleKeyHandle = Addressables.LoadAssetAsync<GameObject>("Panda");
        yield return loadWithSingleKeyHandle;

.

Following errors where shown.

1-15 11:47:34.299 29683 32017 E Unity   : RuntimeData is null.  Please ensure you have built the correct Player Content.
01-15 11:47:34.299 29683 32017 E Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
01-15 11:47:34.299 29683 32017 E Unity   :
01-15 11:47:34.308 29683 32017 W Unity   : Addressables - Unable to load runtime data at location UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].
01-15 11:47:34.308 29683 32017 W Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
01-15 11:47:34.308 29683 32017 W Unity   :
01-15 11:47:34.310 29683 32017 E Unity   : Exception encountered in operation InitializationOperation, status=Failed, result= : Addressables - Unable to load runtime data at location UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].
01-15 11:47:34.310 29683 32017 E Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
01-15 11:47:34.310 29683 32017 E Unity   :
01-15 11:47:34.326 29683 32017 E Unity   : Exception encountered in operation CompletedOperation, status=Failed, result= : Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=Panda, Type=UnityEngine.GameObject
01-15 11:47:34.326 29683 32017 E Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
01-15 11:47:34.326 29683 32017 E Unity   :
01-15 11:47:34.398 29683 32017 E Unity   : Exception encountered in operation ChainOperation<GameObject> - InitializationOperation, status=Failed, result= : ChainOperation of Type: UnityEngine.GameObject failed because dependent operation failed
01-15 11:47:34.398 29683 32017 E Unity   : Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=Panda, Type=UnityEngine.GameObject
01-15 11:47:34.398 29683 32017 E Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
01-15 11:47:34.398 29683 32017 E Unity   :
01-15 11:47:43.580 29683 32017 E Unity   : Unable to find _burst_generated
01-15 11:47:45.730 29683 32017 E Unity   : ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
01-15 11:47:45.730 29683 32017 E Unity   : Parameter name: index
01-15 11:47:45.730 29683 32017 E Unity   :   at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <9577ac7a62ef43179789031239ba8798>:0
01-15 11:47:45.730 29683 32017 E Unity   :   at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
01-15 11:47:45.730 29683 32017 E Unity   :   at PlaceOnPlane.Update () [0x000e2] in <278801f7cb464741aaa285d2a3a27d78>:0

Should I build

Have a few question about addressables.

  1. In order for addressables to work on machine 2 should I need to send the bin file or the Server data folder(.json,.hash and .bundle) and overwrite the project on machine 2.

  2. Consider the scenario that if I uploaded the Server data(.json,.hash and .bundle) onto a remote server and instantiated model on my project. Now I want to add a new model. How will I update my build? After adding the model under Addressables I have updated the bin file and deleted all the old contents in the remote server and added contents of the ServerData local folder into the remote server.Is this we update the previous build?

But if the above method is correct it is no use if we cant update ServerData folder from different machines.

1 Like

Has anyone come closer to a solution for this?

My understanding is that as long as all build environments are using the same Addressables Profile then you can all share remote assets. Use “Update a Previous Build” and commit the addressables_state.bin to source control.

You can add new groups and move assets between groups all you want @zyonneo . If you change the addressables profile then you will need to do a new build.

The RemoteLoadPath in my addressables profile looks like “(=env=)/[BuildTarget]” and I replace the “(=env=)” with the server address at runtime using “TransformInternalId”.

Okay I figured out how to do this.

1st you need the addressables_content_state.bin in the server data folder.

I thought that would be enough but it isn’t, for you see we have been deceived!!! As another addressables_content_state.bin file was created.

It lives here; Library/com.unity.addressables/aa/android/

This is where the editors “build Catalog” exists and it has to be the same for each editor instance in order to work! So to be safe I recommend copying everything in the folder.

Multiple machines can build but you have to be careful, each state.bin file has to build off the last one. If you and a colleague update at the same time you will effectively fork the .bin file and future updates.

@TheNullReference I have a theory that BuildPlayerContent() copies the build catalog into Library/. So if you call BuildPlayerContent() before BuildPlayer() then you won’t have version control the catalog in the Library folder - just the one in Assets/AddresssableAssetData. I can’t test my theory properly since we still build all of the content on my machine :stuck_out_tongue:

1 Like

Hmm cool, I will try it