Search Unity

Help Wanted Memory limit crash on old iphones

Discussion in 'Asset Bundles' started by techstudy, Aug 18, 2021.

  1. techstudy


    Oct 17, 2017
    Hey there,
    I'm currently developing an AR application, where I show different 3D Models at different locations in my local city. In order to be able to exchange the models without submitting a new build to the app store, I exported the prefabs including the .blend files as bundles and download them right on the phone.

    On my personal iPhone 12 this runs like a charm, but on older iPhones, the app crashes mostly, because the LoadAsset Function overloads the internal RAM. Strangely it works anyway sometimes, when I just reopen the app and start the function again. Unfortunately, I cannot reproduce this scenario, as it really happens very randomly.

    In the XCode debugger I saw, that on the iPhone 7 the App loads over 1GB in the memory, until it crashes. On my iPhone 12 it doesn't load more than 800-900 MB. The bundle is 19MB compresses and the prefab (including a .blend file) is 114MB.

    Is there a way how to deal with this scenario and maybe overcome the memory limit crash on old iPhones?

    Thanks a lot in advance!