LoadLevelAdditiveAsync (419696)

can this be started with the push of the button?
or it is automatically started?

also i would like somebody to make clear something for me…if i build, say for example, streaming build with 10 scenes, that have a lot of objects and textures, the size will be huge? and what is the best solution for this.

to put textures in asset bundles and to apply them later to the objects…what i can do?

yes, put the code in a button function ans when you press it, it will load the scene.
for the second you need to use assetbundles and stream those into your game to keep the loading size at a minimum

ok i see there might be some confusion here, i know that i can load scene with the push of the button but when it is already streamed. what i need, and dont know if it is possible, that i can start streaming with the push of the button? and then push again to load the scene?

or is there a way to start downloading scene (asynchronously, so that i can rotate camera around without any glitches), with the push of the button, and when it is done downloading to load it into scene by a push of the button.

anybody?

in the streamed webplayer it will handle the order of streaming itself basing on the scene order, you can’t stream it manually.

And yes you can start downloading asset bundles async → WWW class
and load the bundle then from there.

without pro and asset bundle you can’t stream anything, the whole player will be downloaded as one chunk

i have pro so i am stuck with using LoadLevelAdditiveAsync… i cant use asset bundles since objects that i am loading contain scripts and colliders.

i am surprised that downloading of levels could not be
initiated by pressing the button… it is strange you have to admit. maybe i am missing something…

scripts and colliders don’t prevent you from using asset bundles.

Scripts just have to be in the main application that loads the rest, thats easy to grant. You can then freely assign them in the asset bundles.

Where the problem with colliders should be is over me cause I never had any problems with them :slight_smile:

And there is no such thing as downloading levels in relation to loadlevel
loadlevel, independent in which incaranation, loads scenes that are present within the controlled space of the player.

This means that they are

  1. part of the original player
  2. were loaded through an asset bundle

all you have to do is ensure that they are there at the time you want to use them and you are fine to go.

So what you need to do:

  1. make button start the www download of the bundle
  2. once the yield return www has finished, you do an async load of the scene
  3. once thats ready it will switch scenes.

thats basically a 10 liner or so :slight_smile:

Just to mention that: No idea what you wanted to indicate with the script part of your answer but there is no way to add scripts at runtime. The code is always part of the player thats executed.
the only way to change code is loadweb and that actually kicks out your whole current player and loads a new one

i will work on this more, but i can tell you that this is the most confusing part of unity, at least for me…

thanks for the help.

if it is a 10 liner than you could maybe share your knowledge with us :slight_smile:

To cite myself on the content of that 10 liner:

I won’t be posting it cause its easy enough to write it given you have any background in the related base classes and follow the 3 steps above. If you haven’t you will need to learn about it anyway to do any kind of efficient streaming or any streaming at all outside the scene loading.

should your script then have problems or not work, I will naturally help if you post the offending script