Streaming Tutorial anywhere?

Ok, struggling a bit here. Currently evaluating the Pro version and when it comes to streaming the information is somewhat scatter-shot. Is there a tutorial anywhere?

When I say 'streaming', I'm referring to the loading and unloading of assets within the same game level. For example: in a U shaped level, where items at one end of the U (area A) and items at the other end of the U (area B) are loaded in and out depending on the players proximity to area A and B.

  1. In area A the items of area B aren't visible or loaded
  2. At the mid point of the U, where although neither area is visible, both areas are loaded
  3. as the player goes around the last bit of corner, area B is now visible and area A is unloaded.

This is for a stand alone 3D PC game. Is this possible? I'm guessing it is.

The example project on the unity site has no documentation and Errors when it's loaded. Examples are good, but they explain nothing at all.

I'm still in the dark on Asset Bundles. Help!

Take a look at Character Customization example.

Wouldn't it in your case be much simpler to use Application.LoadLevelAdditiveAsync? Basically give every level segment it's own root gameobject and put it in its own scene, have a simple area manager that manages which segments needs to be loaded or unloaded, load with the LoadLevelAdditiveAsync and destroy gameobject root with all children when a segment has to be unloaded.


As apparently it isn't clear what I meant, I now linked back to the script reference so you can look it up. When playing with Unity, you must have walked into the concept of scenes. Basically it's all the game objects that are in Hierarchy viewer together and saved into a scene file.

With `Application.LoadLevel` you can load different scenes, where every scene could for example represent a level in the game. When using `Application.LoadLevel` you replace the scene, so all gameobjects that where in the scene before calling LoadLevel are deleted (except when marked as dontdestroybetweenscenes) and the new scene is loaded in. In your case you want to add things to your scene, not replace the scene.

Luckily there's an `Application.LoadLevelAdditive` as well, that does load a new scene in, but leaves all game objects (the old scene) there. So, now you could put different segments of your level in different scene files and have these load in when getting close to them.

First, when going this route you'll notice some annoying game freeze when using `Application.LoadLevelAdditive`, as the game is paused until the scene is loaded. That's why there's an `LoadLevelAdditiveAsync` as well, this does the same, but in the background, so the scene won't be completely loaded directly after calling, but it will be loaded. The example in the script reference shows how you could use a Coroutine to be able to track when the loading is done, but you could go the simple way and just make sure the loading is triggered early enough so it's surely loaded before player is close enough to see it.

Now, how do you make the sections (scenes) load in on the fly? There you have to do some intelligent coding. The easiest way is put a block somewhere in the path the player can't get around with a trigger, and the trigger code calls the `Application.LoadLevelAdditive`.

How to unload? The easiest way is by having a trigger object again that just calls Destroy on the objects that need to be removed. To make it easier it's smart to put everything of a sector under one root gameobject.