x


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.

more ▼

asked Jun 22 '11 at 07:43 AM

yosh gravatar image

yosh
901 73 81 94

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Jun 24 '11 at 01:52 AM

Dreamora gravatar image

Dreamora
3.3k 1 4 25

@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 minimize the hipcup effect by adding bundle-loading delays there. Think about it! ;)

Apr 11 '12 at 02:06 PM Cawas
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x427
x394
x199
x98

asked: Jun 22 '11 at 07:43 AM

Seen: 1328 times

Last Updated: Apr 11 '12 at 02:06 PM