Search Unity

Question Replacing assets using Asset Bundles

Discussion in 'Asset Bundles' started by EOMedvis, Jun 5, 2021.

  1. EOMedvis

    EOMedvis

    Joined:
    Feb 19, 2019
    Posts:
    91
    I'm hoping to use asset bundles to update and replace existing files within a Mobile app after the app has already been compiled. How would I go about doing this? I originally going to include the asset bundles in the app, and after its been installed, download any updated asset bundles of the same name and replace them within the app's default folder. However, I've read that the Install folder for an app is read-only, so I assume I can't just overwrite files or delete them and replace them with new ones. I could just download the app into the persistent data path, but since the files are large, I don't want to double the size of the app.

    Is there a way to replace older files with new ones? Or am I misunderstanding something?

    Thanks in advance.
     
  2. TobyKaos

    TobyKaos

    Joined:
    Mar 4, 2015
    Posts:
    214
    Indeed you need to copy the assetbundles into persistant data path and this will duplicate it. Then you can replace it after.

    Or you can download it the first time the app launch.