Application.CanStreamedLevelBeLoaded returning False

Hello All!

I’m trying to stream levels. I had no issue in 2.6.1 but I cannot seem to get it to work in 3.0 with large levels.

Here is my code:

void LoadLevel(string loadingLevel)
{
Debug.Log(“++++++++++++++++++++++++++++++++++++++LoadLevel: " + loadingLevel);
if (Application.CanStreamedLevelBeLoaded(loadingLevel))
{
Debug.Log(”++++++++++++++++++++++++++++++++++++++Streaming LoadLevel: " + loadingLevel);
Application.LoadLevel(loadingLevel);
}
else
{
Debug.Log("++++++++++++++++++++++++++++++++++++++Cannot Stream LoadLevel: " + loadingLevel);
}
}

It seems to work on my tiny scenes (ones that are only about 5mb) but the larger ones (13mb) seem to fail. They are in the build settings so it is not because of that. I am checking “Stream” for the WebBuild.

My question is, why would I not be able to stream a level and how do I fix it to make it stream?

Thanks!

if it tells you that you can’t stream it yet then its not downloaded yet.
let it output the progress to some label so you get an idea how far the streaming is

Something like:

GUI.Label(Rect(10,80,200,25), ("Loading Level " + Mathf.Round(Application.GetStreamProgressForLevel(loadingLevel) * 100) + “%”));

If so, then at what point do I load the level? When it reaches 100% ?

Try this out :

if(Application.CanStreamedLevelBeLoaded ((Application.loadedLevel+1)))
{
GUI.Label(new Rect(Screen.width/4+10,Screen.height/2-25,285,150), “Starting the game!”);
Application.LoadLevel((Application.loadedLevel+1));
}
else
{
GUI.Label(new Rect(Screen.width/4+10,Screen.height/2-25,285,150), “Loading the game: “+Mathf.Floor(Application.GetStreamProgressForLevel((Application.loadedLevel+1))*100)+” %”);
}