x


streaming - proof of concept

i am trying to figure out how to implement streaming into my project. i was wondering is it possible to have different scenes in project that will have different sets of objects and they could be streamed when i need them? ofcourse that could be done, but i have some questions.

1.the size of the build? is going to be veeeeery big, or the size will not be that big because they will be streamed anyways.

2.i will have many objects in the core scene, like camera, lights, 3d interface that will be used in other scenes, does every object need to have DontDestroyOnLoad?

3.so, if the new scene is loaded (streamed) and then i want another one to be streamed but then i dont want the previous one that was streamed to be destroyed, so that means that every object in the project need to have DontDestroyOnLoad() in the Awake()?

any help appreciated! thanks!

more ▼

asked Jul 29 '10 at 01:02 PM

pretender gravatar image

pretender
497 121 134 145

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first
  1. is difficult to answer without having any numbers - but, yes it is possible to distribute the build size into separate downloads, and have a very small main unity3d file, and stream everything as needed. Getting this right requires a lot of planning of where to store which data, when it needs to be loaded, etc, and is not trivial at all.

  2. yes, DontDestroyOnLoad should be used for things you want to keep around when loading new levels.

  3. note that there is also Application.LoadLevelAdditive(), which will load a new scene without unloading the currently loaded scene. This is well suited for streaming terrains, where you want to load new parts of the terrain as the player moves around.

more ▼

answered Jul 29 '10 at 01:30 PM

jonas echterhoff gravatar image

jonas echterhoff ♦♦
9.8k 7 23 104

basically i am trying to build not so simple viewer for objects that i have. so i want to keep all objects in the scenes that i would stream when needed. that is what i want to do.

the level that will be first loaded is the one that has camera and other things that will are used in all scenes. other scenes are just objects that i need to show. so for example i have a car, the first thing that i will load when app starts is outer part of the car, then i would have gui that will have the list of other objects that should be loaded when user clicks them, that are in separate scenes. is that ok?

Jul 29 '10 at 01:44 PM pretender
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x82
x39

asked: Jul 29 '10 at 01:02 PM

Seen: 1379 times

Last Updated: Jul 29 '10 at 01:02 PM