Web Streaming

Hi,

I have two questions:

What is the best way to load scene files that are known after Initialization (Unity Web Streaming, WWW, …)?

Background: The game world will look different (different terrain, character files, …) depending on some input. So for example if I have the choice of 300 terrains I naturally only want to load the one stated in the input (the programs behavior will be identical all the time). Does Unity Web Streaming support this in some way or should I do it with the WWW-class?

sounds like you want to use assetbundles which are, like streaming, a Unity Pro feature

Hmmm. With asset bundles I need to know the different possible files or file groups to be loaded beforehand, right?

Because every single world asset is chosen dynamically due to some input, which tells me every single object that i need (and where i can find it).

So I guess with this the AssetBundles are out…?

I don’t see why. Because independent of how you do it, such knowledge will be required.

knowing the bundle is in no way different from knowing which scene you need to jump in or from which resources subfolder you want to load and instantiate a resource.
Thats all just basic asset management.

Yes, but the knowledge about all objects in the scene comes from an external file. And the possible combination of the objects in the scene is unlimited (including avatar clothing,…).

And Asset Bundles (groups of objects to be loaded) I would have to build first (BuildPipeline.BuildAssetBundle) before building my Unity Program, hence I would have to know the combinations.

Or I can I build AssetBundles on Runtime??

So in my case (I am very new to Unity so maybe I dont get it right) I would have to build an asset bundle for every single object → every time new objects are introduced I have to build an Asset Bundle → that would be a tedious maintenance that I would actually want to not care about.

You’ll need to make those assets ahead of time anyway and post them as AssetBundles. Then at run-time you read in your data, determine which are needed and stream them on-demand only if needed. You need to break things down into the smallest possible chunks in AssetBundles. Your only other solution is streaming down entirely levels or Unity web player files and those are even “worse” in terms of granularity.

So, AssetBundles FTW!

Which you will have to do anyway unless you expect some supernatural magic to do this job, so the program knows where it finds what.
I don’t know what kind of game you create but if it goes into the direction of online RPG.

There are two ways for you actually:

  1. Optimize your asset handling to only download what is required or potentially required. At worst this can go that far that every single model + texture ends as an own bundle. But it would likely be smarter to bundle a few things together that will potentially be used together and load them down by ascending rarity in the world in the background.
    For example item sets or generally thematically familiar things like all the scenery in a zone.
    The more optimized the system is meant to be towards traffic and initial start time, the more effort you will have to put into it.

  2. Make a full install instead of a webplayer and save the time you need to develop a smart asset handling system.

Ok, maybe the supernatural power will come in version 2.5…:wink:

Maybe I wasnt clear enough, though the replies gave me the info I needed.

So thanks for that.

One more question:

In the case I have an asset bundle for only 1 object:
What is the advantage of building an asset bundle out of it, instead of simply downloading the according .FBX file?

You won’t be able to do anything with an .FBX file, unless you write your own parser for it.

–Eric