0
votes

I'm a bit confused as to how web deployment and the streaming aspect of Unity builds works.

Is it correct that the unity web player will stream all content in the background, if the streaming build setting is checked on?

What happens if the user requests the last scene in the build settings. Will the web player have to wait untill all other scenes have loaded before it can serve the last scene?

If these assumptions are true does that mean that if you want a "load on demand" model you have to use asset bundles for your scenes?

Thanks

1

1 Answers

3
votes

When using a streamed build the player will include all the levels that have been set up in the build settings in the order in which they appear in the build settings. Depending on how large your levels are, this might even be sufficient when having a "random access" use case.

Since you can check the current progress of level loading using GetStreamProgressForLevel you could simply display a "loading" dialog if the player selects a level which is not yet ready. If you have like 10 levels 150kb each, that would be a 1.5mb download at max, which could be downloaded within a few seconds on a reasonably fast internet line.

If you need something that is non-linear AND has large levels, you need to go the asset bundles route. Building asset bundles requires Unity Pro and you can only do it with custom scripts (or you use some automation solution like uTomate).