Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Could not Move to directory Library/com.unity.addressables/aa/Windows, directory arlready exists.

Discussion in 'Addressables' started by RakNet, Aug 25, 2021.

  1. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    313
    All of the sudden my builds no longer have addressables data.

    Code (CSharp):
    1. Could not Move to directory Library/com.unity.addressables/aa/Windows, directory arlready exists.
    2. UnityEngine.Debug:LogError (object)
    3. DirectoryUtility:DirectoryMove (string,string) (at Library/PackageCache/com.unity.addressables@1.18.9/Editor/Build/DirectoryUtility.cs:35)
    4. AddressablesPlayerBuildProcessor:CleanTemporaryPlayerBuildData () (at Library/PackageCache/com.unity.addressables@1.18.9/Editor/Build/AddressablesPlayerBuildProcessor.cs:34)
    5. UnityEditor.EditorAssemblies:ProcessInitializeOnLoadMethodAttributes ()
    6.  
    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

    But why would this be happening?
     
  2. Endahs

    Endahs

    Joined:
    Sep 16, 2014
    Posts:
    94
    Getting this all of a sudden with latest Addressables 1.20.3. You ever figure out why this was happening?
     
  3. ExobotsDeveloper

    ExobotsDeveloper

    Joined:
    Feb 16, 2022
    Posts:
    9
  4. MarianoMariscal

    MarianoMariscal

    Joined:
    Feb 4, 2022
    Posts:
    5
    UP with 1.19.19
     
  5. manueljgomez

    manueljgomez

    Joined:
    May 24, 2022
    Posts:
    1
    Same, getting it with 1.19.19 and Unity 2020.3.30
     
  6. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
  7. ckirk_unity

    ckirk_unity

    Joined:
    Feb 1, 2018
    Posts:
    4
    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.
     
    Last edited: Aug 5, 2022
  8. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
    @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.
     
  9. ckirk_unity

    ckirk_unity

    Joined:
    Feb 1, 2018
    Posts:
    4
    @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.