Search Unity

How to access a file in OBB? (Bypassing OBB file size limit for Quest)

Discussion in 'Editor & General Support' started by Christian_LuckyVR, Oct 10, 2019.

  1. Christian_LuckyVR

    Christian_LuckyVR

    Joined:
    Jan 8, 2019
    Posts:
    4
    Hey there,

    We've hit the 2GB OBB file size limit imposed by Unity and are trying to get around that by adding our asset bundles to it post-build (opening it in WinRAR and dragging them in). This is for Oculus Quest and they allow a 4GB OBB.

    The issue we're having is trying to get Unity to load the files from the OBB. Here's what we're trying based on this old post:

    https://forum.unity.com/threads/ass....1570460924-369668790.1565618859#post-2679871

    Code (CSharp):
    1. assetName = assetName.ToLower();
    2. string bundlePath = Application.dataPath + "!assets" + "/Android/" + assetName;
    This gives me a "Unable to open archive file" error. I can open the obb file and tell the asset bundles are there.

    Any help would be appreciated :)

    Thanks!