Unity Version: 5.3.7
I have five scenes in UnityEditor. It is loaded all of scenes very slowly after building WebGL. But I don’t want to select “Development Build”.
I want to load first scene not others scene when I open the WebGL. If the first scene is loaded successfully, then I can click the button to load others scene.
There is the option named “First Streamed Level” in Unity 4. I don’t why Unity 5 has no?
First Streamed Level was related to WebPlayer if i recall.
You do not have this option with WebGL. Instead, you should pack your scenes and other assets into Asset Bundles.
When starting the game, load the first scene, and the rest should be in asset bundles that will be downloaded in the background. When the download was complete, you can click the button to load the other scenes, as you described.
Thanks for replying. If I pack my scenes and other assets into AssetBundles, then I delete some assets in the project. When I open the webbrowse and load the AssetBundles, are they showed?
“A” is marked to be built into the game (in Build Settings).
The rest are all packed into asset bundles (B, C, D, E). You’ll have code that immediately starts to download them on startup (or verify that they already were downloaded before).
Then you could load any of the other scenes from the asset bundle. Your initial load times will be faster since only 1 scene will be loaded. The game will be responsive while downloading all other scenes in the background.