Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Controlling what ends up in assets\com.unity.addressables

Discussion in 'Addressables' started by tencnivel, Aug 7, 2020.

  1. tencnivel

    tencnivel

    Joined:
    Sep 26, 2017
    Posts:
    24
    Hey, my APK build gets bloated by addressables that shouldn't be there.

    In my attempt to isolate the problem I did the following:
    • Create an empty scene (so that nothing holds a reference to an asset which will somehow make an addressable group end up in the build)
    • Create a new build for the addressables ('Build > New Build > Default Build Script')
    • Build an APK with this empty scene

    If I unzip the APK and look at what's in 'assets/com.unity.addressables/' I have the following:

    $ du -hs unzip_apk/assets/com.unity.addressables/*
    97M unzip_apk/assets/com.unity.addressables/Android
    128K unzip_apk/assets/com.unity.addressables/catalog.json
    49M unzip_apk/assets/com.unity.addressables/iOS
    128K unzip_apk/assets/com.unity.addressables/link.xml
    128K unzip_apk/assets/com.unity.addressables/settings.json
    18M unzip_apk/assets/com.unity.addressables/StandaloneWindows64


    In the `Android` folder I find an asset bundle of a group
    In the `iOS` folder I find an asset bundle of another group
    In the `StandaloneWindows64` folder I find an asset bundle of another group

    All those folders should be empty, especially the one for the other platforms.

    Maybe there is some problem with some "addressables cache" that I have no Idea how to clear (running 'Build > New Build > Default Build Script' is the only thing I know to have a fresh new build of the addressables asset bundles)

    I am running Unity 2020.1.0f1 and Addressables 1.8.4
     
  2. tencnivel

    tencnivel

    Joined:
    Sep 26, 2017
    Posts:
    24
    some additional information:

    I have deleted the 'Library' folder and restarted Unity, then I built the APK.
    No improvement.

    I notice the following:

    The folders of the different platforms (Android, iOS, StandaloneWindows64) inside 'assets\com.unity.addressables' contain different asset bundles.
     
  3. tencnivel

    tencnivel

    Joined:
    Sep 26, 2017
    Posts:
    24
    ok, so there was a folder for addressables in the StreamingAssets folder that was ending up in the 'assets' folder of the build. I deleted the folder and now the content of the APK is as expected.
    I don't know where this folder was coming from but what I know is that I did a lot of version upgrades of both Unity and the Addressables package in the late month as well as a lot of testing with the addressables system (creating groups, change their path, etc...)
     
unityunity