Search Unity

Question Android build fails if StreamingAssets folder is over 4GB

Discussion in 'Asset Bundles' started by unity_E98B5125B7E007F0ADCE, Jan 3, 2023.

  1. unity_E98B5125B7E007F0ADCE

    unity_E98B5125B7E007F0ADCE

    Joined:
    Feb 22, 2022
    Posts:
    4
    Hi, I'm using a lot of AssetBundles in my project and they are located in the StreamingAssets folder - a few hundred files ranging from a few kB to a few hundreds of MB, for a total of 9GB. In any moment during runtime, there are only a few of them loaded to avoid memory overuse.
    The app is working fine when built for Windows. However, when I try to build for Android, the build process fails:

    > archive's size exceeds the limit of 4GByte. To build this archive, please enable the zip64 extension.
    See: https://docs.gradle.org/7.2/dsl/org.gradle.api.tasks.bundling.Zip.html#org.gradle.api.tasks.bundling.Zip:zip64


    Is there any way that I could possibly build the data to the app?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    Split apk and obb could work
     
  3. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,736
    I think you should use asset packs for your app data, not streaming assets. Or put asset bundles online and download them.
    With so many assets it is recommended to limit initially to just he assets that are required and download the rest on demand.