All of the sudden my builds no longer have addressables data.
Could not Move to directory Library/com.unity.addressables/aa/Windows, directory arlready exists.
UnityEngine.Debug:LogError (object)
DirectoryUtility:smile:irectoryMove (string,string) (at Library/PackageCache/com.unity.addressables@1.18.9/Editor/Build/DirectoryUtility.cs:35)
AddressablesPlayerBuildProcessor:CleanTemporaryPlayerBuildData () (at Library/PackageCache/com.unity.addressables@1.18.9/Editor/Build/AddressablesPlayerBuildProcessor.cs:34)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadMethodAttributes ()
I tried clearing the library data and reimport all, but it didnât fix the problem.
I was able to fix it manually with
xcopy E:\Work\EmpireOfEmber\Client\Library\com.unity.addressables\aa\Windows D:\Builds\Steamworks\Empire of Ember_Data\StreamingAssets\aa /E /H /C /I
Hi all I do recall some issues with AddressablesPlayerBuildProcessor failing to copy/move files to StreamingAssets. This is fixed in Unity 2021.2+ where we use BuildPlayerContext.AddAdditionalPathToStreamingAssets to avoid copying/moving files entirely. Unity - Scripting API: Build.BuildPlayerContext.AddAdditionalPathToStreamingAssets
This was a nice improvement to the copy/move that was being done before but with the copy/move being done previously I was able to delete the bundles that were copied to the streaming assets folder. I canât do this anymore with the whole folder marked as âstreaming assetsâ and no way to unmark it. Since this happens on the Library/com.unity.addressables/aa folder I canât move the bundles out of that directory to prevent them from being in streaming assets without causing other issues.
Is it possible to prevent the addressable bundles going into streaming assets while maintaining a local build path on the bundle?
Edit: Iâve just tried to use custom build and load paths to prevent the bundle from going into a folder marked âStreamingAssetsâ and unfortunately thereâs an addressable bug when building addressable groups using custom paths that cause the editor to lock up, requiring a force quit, and the addressables to not build. Iâve reported and logged the bug to Unity.
This was happening in Unity 2021.3.6f1 and with com.unity.addressables 1.20.3, 1.20.0, 1.19.19.
@ckirk_unity Hmm interesting weâll take a look at the bug report when it comes our way. If you remove your local bundles from StreamingAssets, where would they be located then? The reason that local bundles are moved to StreamingAssets by default is so that they will be included in the the StreamingAssets directory of your player build.
@pillakirsten I needed to be certain the addressable bundles donât end up in streaming assets in the scenario those bundles are used in an Android App Bundle (AAB) build or On-Demand Resources (ODR on iOS). I wouldnât want the bundle to get downloaded by Android/iOS and also already be in the build, needlessly increasing the size of the app. Basically for downloadable content that isnât using the remote paths.
In the end I actually found a work around. When using the âBuild and Load path variablesâ in the addressable profile window I was able to safely set custom paths that build without the error. This was likely the best way to handle it too so I donât need to define the paths in each addressable group but instead can do it as a preset.