How to Preload entire web game with a Loading progressbar?

Hi there,
Our game works fine on offline.But when we stream the game from web.When clicked play,The second scene buffers slowly and scene remain in current main menu .Our game size is 6.5 MB .We understand that we need a preloader or at least some load progress bar indicating the stream is in progress.We used load level async and we even purchased scene preloader from asset store .But that package just works in one scene .It doesn’t preload the entire game.We will be very thankful to you if u could help us from this situation.I have attached link below please check

In general you have two options:

  • Don’t use “streamed” in which case Unity will download your complete game before even starting the first scene.
  • Using “streamed” and design some kind of loading scene as the first scene.

I guess you want to go for the second option. In this case it’s important to note, that you should keep the first scene as small as possible so it’s loaded fast. Avoid using “Resources” folders as they are shipped with the first scene.

To display a progressbar you can use Application.GetStreamProgressForLevel to get a value between 0 and 1 for each level. There is no loading progress for the whole game, but you can simply accumulate the values for each level and divide by the level count (simply the arithmetic mean).

Besides GetStreamProgressForLevel there’s also Application.CanStreamedLevelBeLoaded which just returns a boolean if the given level has finished downloading. This could be used to enable / disable startbuttons for each individual level.