Search Unity

how to preload assets with progress bar

Discussion in 'Editor & General Support' started by jayadratha, Aug 8, 2017.

  1. jayadratha

    jayadratha

    Joined:
    Jan 19, 2017
    Posts:
    6
    I know about preloaded assets in play settings. But I want it with progress bar.

    The problem is I dont have a option to show a progress bar while assets are loading. I want to make a loading scene which will be the first scene of the game. And in that scene I will load all assests which will be needed all the time & while loading those assets need to show a loading bar with progress.

    Anybody have a solution for this?
     
  2. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,657
    You'll need to do something like pack those assets into an AssetBundle. Then you can use asynchronous loading to load them from the bundle while displaying a progress bar.
     
  3. jayadratha

    jayadratha

    Joined:
    Jan 19, 2017
    Posts:
    6
    Isn't AssetBundle for DLC?? I mean if I load an assetbundle, will it remain in the RAM/VRAM all the time??
    I actually want the feature of "Preloaded Assets" in PlayerSettings.
     
  4. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,657
    You can keep an AssetBundle loaded the whole time, yes.
     
  5. jayadratha

    jayadratha

    Joined:
    Jan 19, 2017
    Posts:
    6
    Not what I was looking for actually. Right now everything referenced to the scene itself. No manuall stuff. If I use asset bundle I have to manually handle the references.

    The thing is I have a big scene and loading it takes time. Whenever I come from another scene to that big scene it takes time.

    Now I want to make all the sprites of that big scene loaded at the game startup & remain loaded in VRAM. So that when that scene again loads it doesn't need to load all the sprites again.

    NOTE: I'm not doing any Resource.Load. Everything referenced to the scene itself.

    I have done it by "Preloaded Assets" option in PlayerSettings. But when I'm using it taking time on the black screen before the first scene.. Thats why I want to manually do the thing which "Preloaded Assets" options does & show a progress bar.

    Any Help?
     
  6. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,657
    You don't have to manually handle the references. Just pack your scenes into AssetBundles too.