i made a scene with a loader and 3 additive scene.
the loader scene has to load the 3 additive scenes together.
but it won’t load the the scenes… it sticks to the loading screen.
when i play in Unity it only loads the last scene(scene3).
what’s the problem?!
private var started = false;
private var isLoading = false;
function Update()
{
if (Input.GetMouseButtonDown (0))
{
if (!started !isLoading)
{
isLoading = true;
LoadScenes();
}
}
function LoadScenes ()
{
yield WaitForSeconds (2);
Application.LoadLevelAdditive (1);
Application.LoadLevelAdditive (2);
Application.LoadLevelAdditive (3);
isLoading = true;
}
do you build a streaming player? if so, are you sure that all scenes are already streamed in? because if not you dead lock it till that point.
generally I wouldn’t really go the loadleveladditive way (at least not until a later point where you expand the world instead of just lazily missusing it to split informations where prefabs would work just as well with dynamic instantiation) in a webplayer unless you want to enforce a whole load before the player actually starts which is totally suboptimal out of my view
I use loadleveladditive because of we want to re-use the project for other projects.
in my load file is the GUI and camera’s and stuff
the loadleveladditive scene is the model wich will change per project.
I also had a follow-up, which is identical to your original post:
As written in the report, my “fix” was to have objects in the additively loaded maps that registered with some sort of manager to kick in new LoadLevelAdditive calls. Hairy. What is even more hairy, is that this was in fact used to get around the “prefab-in-prefab” limitation :S
ok it almost works…
i build a webplayer of it, but it still sticks to the loading screen.
so it won’t get past the Application.LoadLevelAdditive.
(it looks like unity doesn’t know what to do with that command, so it just does nothing)