All groups local and static (Cannot Change Post Release).
The GameObject.prefab has direct references to SquareDir.png and Triangle.png. So one reference of each group. The only difference between these two references is that one is located inside an addressable directory and the other is not.
Now we build, and not surprisingly, an addressables_content_state.bin file is created.
Then how about we modify a value in GameObject.prefab? like the x coordinate of its transform component.
Finally, letâs run the Check Content Update Restriction tool. Since dependencies are considered, the new content update group should contain: GameObject.prefab, SquareDir.png and Triangle.png.
Oddly enough, this is the result:
The asset (SquareDir.png) inside the addressable directory is not detected!..
This causes runtime errors when this content update bundle is downloaded and applied, because the prefab wonât have the reference to that asset.
This seems to me a very common scenario of usage. Perhaps no one uses addressables directories?
Anyway, after investigating why that asset wasnât showing up in the content update preview window, I found out that the method GetStaticContentDependenciesForEntries of ContentUpdateScript.cs calls this var depEntry = settings.FindAssetEntry(guid); FindAssetEntry then calls var e = g.GetAssetEntry(guid);.
But GetAssetEntry method only considers the assets marked as an addressable explicitly. So it returns null here. Although the dependencies are calculated correctly, this is completely skipped because of this.
We are using Addressables 1.16.1. But Iâve tested some other 1.16.x versions and the same thing still happens. (I also tested 1.17.x but there are others issues [that Iâve already reported] before this one so I couldnât test it)
Hi weâve changed the behavior of âCheck for Content Update Restrictionsâ in 1.17.13 to only list dependencies for modified assets if the bundle name has changed. For example this can be trigged by changing the value of Internal Bundle Id Mode from âGroup Guid Project Id Entries Hashâ to something else, prior to a content update.
Iâm still creating a ticket for this because testing the example in the latest version is still buggy (is causing an ArgumentNullException). Out of curiosity, is this similar to the other bugs youâve already submitted? This way we can close out any duplicate bugs if thatâs the case.
Ok thatâs good to know. Will that only impact the visual side of things? (i.e. dependencies wonât be listed but internally they will be included)
Also, what was the rationale behind that change? (Only listing dependencies for modified assets if the bundle name has changed)
I mean in reality, in the latest versions (1.17.x) I only encountered that exact bug you mentioned (ArgumentNullException) from which I submitted a bug report through the Unity editor.
Although, I ended up not submitting a bug report for the issue I described in this thread. (Since the ArgumentNullException was in my way)
Itâs not just a visual change, the dependencies wonât be included at all internally (if the bundle name hasnât changed). This is because of the new options we added for Internal Bundle Id Mode.
Previously we would always include the hash of all the entries a group in the bundle name (currently the same behavior occurs when the Internal Bundle Id Mode is set to âGroup Guid Project Id Entries Hashâ). If an asset is modified, the hash will change and so will its bundle name. Because an assetâs dependencies reference the old bundle name internally, they need to be included in the content update.
If the bundle name is unchanged, then there is no reason to include the dependencies in the update as their references will still be valid.
Good to know! I saw that your ArgumentNullException bug report is already being looked at, so it should be fixed soon
I have reference missing problem in situation below
Addressable version 1.16.10
Windows Platform
Default Local GroupďźUpdate Restriction = Cannot Change Post ReleaseďźBundle Mode = Pack Separatelyďź Bundle Name = File Name
Drag a folder which has a prefab and a textureďźprefabâs referenceďźinto group
Use Addressables.InstantiateAsync(âAssets/Prefabs/Prefab.prefabâ, transform) in a monobehavior in the main scene
Build Bundle
Build exe
Change the Prefab
Check For Content Update Restrictionďźonly prefab move to âContent Updateâ Group, I check the addressable source code, in the GetStaticContentDependenciesForEntries function, only dependency which is an entry can be added to dependencyMap.So is that means every asset(not folder) should be an entry?
Update a Previous Build
Execute the exe
The origin prefab is like
And i changed the color of image componentďźthen after the update build, the prefab becomes
what expect is
And i use WebExtract & Binary2text Tool to check the bundles in StreamingAssets and ServerData folder ,and find that the ContentUpdate Group Bundleâs External Reference is the new bundle in the library, not the bundle in the StreamingAssets.
I guess every time addressable build bundles, it build all bundles including âcan not changeâ bundles, and calculate bundle dependencies. Is it possible to let âcontent updateâ bundle reference to the bundle in StreamingAssets built before ?
Also i tried addressable 1.18.9, if i set the Internal Bundle Id Mode âGroup Guidâ, the problem gone, because the id wonât change. But âGroup Guid Project Id Entries Hashâ selection still has the problem.
@rookiemike Thanks for the detailed instructions! I was able to reproduce the issue, and will create a ticket to work on the fix
I donât think there is a way to make the âcontent update bundleâ reference the old bundle. The expected behavior for âUpdate a Previous Buildâ is detailed here: Content update builds | Addressables | 1.18.19
What was the ticket that was created for this issue?
We have a work around in place for this which is to recursively expand our addressables folder mappings at build time to remap them as individual assets, but this is not ideal.
What is the recommentation, should we not be using addressables folder mappings if we want to use content updates?