After upgrading Addressables to 1.21.19 and ScriptableBuildPipeline to 1.21.21 we found that there’s a bug building with Build → New Build → Default Build Script
If there’s cached elements the process freezes when reaching the point shown here:
If we clear the cache it builds with no problem at all.
Also, when building addressables ‘slimWriteResults’ are overwritten from true to false. Can this be related since that flag is to improve cache performance?
Further investigation: Tried just updating ScriptableBuildPipeline to 1.21.21 without updating addressables and it happens. Reverting to 1.21.20 (and addressables 1.21.19) work without a hitch
It turns out it doesn’t freeze, building just becomes INCREDIBLY slow. What otherwise would took less than a minute takes now several minutes.
We performed the following test with ScriptableBuildPipeline 1.21.20 and 1.21.21:
Clear all addresables build cache.
Perform a full build. (New Build → Default build script)
Changed a string in a prefab contained in an asset group (only affecting a bundle)
Perform a full build and time it (only 1 bundle should be updated, the other are the previously built versions)
The results are as follows:
With ScriptableBuildPipeline 1.21.20: 42 seconds.
With ScriptableBuildPipeline 1.21.21: 18 minutes!!
Don’t know if slimWriteResults might be the culprit here, but its certainly suspicious and it gets overwritten to false everytime we try to build.
EDIT: Just rebuilding again with New Build → Default build script after a first clean build, even without having made any changes, also triggers this behavior
As you can see, the break was moved inside the if block.
If the scene contains multiple Sprites, CalculateSceneDependencyData would call ContentBuildInterface.CalculatePlayerDependenciesForScene only once in 1.21.20, but in 1.21.21, it would call once for each Sprite!
Calling ContentBuildInterface.CalculatePlayerDependenciesForScene once should be enough.
Can confirm I experience this with version 2022.3.13 onwards. My last safe version to build from is 2022.3.11f1, which uses Addressables 1.21.18 with Scriptable Build Pipeline 1.21.20. As mentioned above, building takes an hour or so on the broken version where it would normally be 20 minutes.
Bugger… Maybe @TreyK-47 , @andymilsom , @davidla_unity or @Ryanc_unity can check this out? I’ve seen a couple post around describing basically the same thing and is quite the regression for people using addressables
EDIT: turns out Unity automatically finds packages that you move in to the Packages folder, and updated the package manifest. Didn’t need to do anything.
I’m being hit by this as well.
Can someone guide me to how I can set up the ScriptableBuildPipeline package to be in my project instead of in the package manager?
I don’t have any other custom packages, so I don’t know what this should look like after I copy the package folder into UnityProject/Packages
this is what it looks like now, but how doI change this to point to the new path?
After updating to Unity 2022, Addressable was unusually slow, so I was looking into what was wrong and found this thread.
Confirmed with 2022 3.14f.
Continue to follow this news