- Home /
Allow player delete Asset Bundle
Hi!
I need some help with the control of assetsbundles from player side. We are creating an App which is like a library of mini games, and I want the player be able to download just the game he wants to play (each game will be an assetbundle) and delete them if he needs more space on the devices or if he is not going to play it anymore... Just like steam to say an easy example.
Is there any way to allow player delete assetbundles on his own device?
Thanks!
Gabriel
Answer by Landern · Oct 09, 2015 at 02:53 PM
Caching.CleanCache will delete all downloaded/cached assetbundles for instance, there doesn't seem to be a built in method for cherry picking.
DestroyImmediate allows the destruction of assets. perhaps you can incorporate this?
One way to work around this could be to call Caching.$$anonymous$$arkAsUsed on the bundles you wish to keep, set Caching.expirationDelay to 1 second while continously every 0.25 sec calling Caching.$$anonymous$$arkAsUsed on the bundles. After this process is done, restore Caching.expirationDelay.
Not very clean, not sure if it would work, but looks like the only option without looking through the file storage and removing the files with System.IO (if that works, I don't know either).
Your answer
Follow this Question
Related Questions
Creating an asset bundle at runtime 1 Answer
Does AssetBundle work on mobile? 0 Answers
Asset Bundles with In-App Payment in Unity Mobile 1 Answer
Asset Bundles compatibility for mobile 1 Answer
Mobile game laggy? 1 Answer