- Home /
Stream lots of AssetBundles at scene start smoothly...
Hi, when i start running my game, i have lots of assetbundles to load (10-15 bundles). In a foreach loop of my start-function, i call my assetbundle-download method. Here i´m using the AssetbundleRequest and loadAsync functions. At the same time it downloads my assets, i want to visualize a loader progress bar. Unfortunately the progressbar is stuttering because of the high impact of the downloads.
Here´s a snippet of the assetloading function:
_download = new WWW(_path);
yield return _download;
if(_download.isDone == true) {
// DL complete
if(abr.asset != null && abr.isDone)
{
// Save Assets
_objectDownloadComplete = abr.asset as Object;
_download.assetBundle.Unload(false);
_download.Dispose();
_download = null;
}
I´ve changed nothing on the Application.backgroundLoadingPriority . What´s wrong with that code? Any ideas how to stream the assets into the scene smoothly without any disturbance? Would be great to know. Thanks for your time and help.
Answer by Dreamora · Jun 24, 2011 at 01:52 AM
You are not doing anything wrong. But even if you use asset bundles, it will not go totally stutter free as there is a short hold when the textures are bound upon first rendering. How long that "short" is depends how optimized your bundles were for realtime streaming.
I assume you are trying to load all this bundle during normal playing right if you mention stuttering?
If not, you can use LateUpdate to update the download status variables, then it won't jump around or alike and it should work fine normally. But perhaps your progress code is the culprit.
The progress bar, out of my experience, will never be fully fluent if thats what you are hoping for, it will always jump in some form as the bundles update the progress basing on the content items loaded not the filesize percentage, if they do it at all.
@yosh Adding to all this, increasing the number of bundles and reducing their size will give you more control on the gaps between each bundle thus enabling you to $$anonymous$$imize the hipcup effect by adding bundle-loading delays there. Think about it! ;)
Your answer
Follow this Question
Related Questions
Asset Bundles download at runtime 1 Answer
Iphone downloadable content restrictions 1 Answer
Accessing a downloaded AssetBundle 1 Answer