- Home /
Multiple levels in web player
If I add multiple levels to a web-player, on start-up, will the web-player attempt to load all the scenes, or just the first scene?
From what I understand from the documentation on streaming Web Player, I could set it up such that when the assets for the first level is loaded, the first scene would load. What I am looking for is the new level only begin to load when there is a level change. (As each level uses completely different game assets from the other). Is this possible?
Answer by spinaljack · May 26, 2010 at 10:52 AM
You can set up a streaming web player like you describe but you need unity pro and you need to read the manual on loading and unloading asset bundles.
http://unity3d.com/support/documentation/ScriptReference/AssetBundle.html
Stuff about async level loading:
http://unity3d.com/support/documentation/ScriptReference/Application.LoadLevelAdditiveAsync.html
http://unity3d.com/support/documentation/ScriptReference/Application-backgroundLoadingPriority.html
http://unity3d.com/support/documentation/ScriptReference/Application.LoadLevelAsync.html
Answer by Lucas Meijer 1 · May 26, 2010 at 10:51 AM
You can do this with AssetBundles (Pro feature). You can store each scene and its assets in a seperate assetbundle, and then manually control what gets downloaded when trough the WWW class.
It's a bit more work to setup, but it also gives you a lot more flexibility.