Search Unity

Delete assets in a "Resource" folder from iOS install

Discussion in 'Editor & General Support' started by BJO, May 2, 2014.

  1. BJO

    BJO

    Joined:
    Mar 25, 2013
    Posts:
    7
    Question: Is it possible to programmatically delete assets included in a "Resources" folder on iOS?

    Background: Our Unity Project, which is geared towards iOS, has many asset files placed in a Resources folder. The first time the app is launched, these files are loaded into memory then saved back onto disk in a new location (essentially creating a duplicate copy). Since the majority of these assets are image files, this effectively doubles the install footprint of our app. Is it possible to delete the original file from the Resources folder? As a work around, could we at least null out the data, so the file size becomes negligible?

    To preempt the question of, "Why are you bothering to re-save your assets to a different file/directory?" We do this so that we can alter the asset files during the lifecycle of the app (for example, art gets updated, therefore we want to overwrite a few of the existing art files).

    Thanks for your help!
     
  2. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    No, the Resources datafile cannot be changed. Sounds like you want to use AssetBundles.