DirectoryNotFoundException during build

I am using version addressables 0.7.4, and building for iOS.
During build, an error is thrown:

DirectoryNotFoundException: Source directory does not exist or could not be found: Library/com.unity.addressables/StreamingAssetsCopy/aa/iOS
AddressablesPlayerBuildProcessor.DirectoryCopy (System.String sourceDirName, System.String destDirName, System.Boolean copySubDirs) (at Library/PackageCache/com.unity.addressables@0.7.4-preview/Editor/Build/AddressablesPlayerBuildProcessor.cs:36)
AddressablesPlayerBuildProcessor.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.addressables@0.7.4-preview/Editor/Build/AddressablesPlayerBuildProcessor.cs:26)
UnityEditor.Build.BuildPipelineInterfaces+c__AnonStorey0.<>m__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:376)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List1[T] oneInterfaces, System.Action1[T] invocationOne, System.Collections.Generic.List1[T] twoInterfaces, System.Action1[T] invocationTwo, System.Boolean exitOnFailure) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:356)
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)

Indeed, this directory does not exist (Library/com.unity.addressables/StreamingAssetsCopy/aa/iOS), but I thought it would be created automatically during build time, am I wrong?

Thanks already for any help

How long is the path to the root of your project? It could be a manifestation of the 260 character path limit - see my post on this thread which may be related Directory Not Found Exception when building local "Packed Assets" Player Content

1 Like

Thanks for your help @DarkVerse , my problem was that I wasn’t calling
AddressableAssetSettings.BuildPlayerContent() on my build pipeline, I thought that building the player would automatically do it, but I need to do it manually.

1 Like