- Home /
Keeping assetbundles in memory vs always loading from cache
Hi all,
A question surrounding assetbundles:
Our app downloads assetbundles from a remote server (or cache) into memory using RemotePackageManager. The plugin does a reasonable job of downloading the bundles and caching them (by wrapping Unity's default assetbundle methods). However it also keeps a reference of every single requested asset bundle (since startup) in memory.
Sooo, my question is: do assetbundles take up a lot of memory when not unloaded and if so where can I see how much in the profiler? Also if I unload an assetbundle after the asset has been succesfully retrieved, will this also unload the asset? And is there an easy way to track if any asset of the assetbundle is still being referenced somewhere in the application?
Thanks in advance.
Answer by JoeriVDE · Oct 25, 2017 at 09:47 AM
To answer my own question, assetbundles have a very low memory footprint (like a few kb each) compared to the assets that are loaded from it. So for anyone reading, it's harmless to keep them referenced somewhere to speed up loading times (that is if they're compressed). As for the unloading, unity's api reference answered that question.
Your answer
Follow this Question
Related Questions
AssetBundle INCREASES Memory Allocation 1 Answer
Memory Locking While Loading Issue 0 Answers
AssetBundles - depend on asset already included in executable 0 Answers
How StreamedSceneAssetBundle differ from AssetBundle in terms of scripting? 0 Answers
Is there a way to set the Addressables Remote Load Path in runtime? 0 Answers