Loadig streamedLevels from obb file

Hi guys,

First of all, I am using unity pro on windows. Please do not give me solutions that work only on mac.

I followed this tutorial. http://labs.exoa.fr/tutorial-unity-4-apk-splitting-google-play-obb/

But, I only have unity 3.5. So, I did the following.

  1. created a asset bundle of all the scenes in my project using the BuildStreamedSceneAssetBundle function

  2. After it created a .unity3d file, I used winrar to zip it and then renamed its extension to .obb

  3. Created a new scene called SceneLoader and added DownloadObbExample as mentioned in the google obb downloader.

  4. Built the .apk with only SceneLoader scene

  5. Hence my first apk is 40MB and my obb is 80MB.

  6. I uploaded on google and after resolving some errors, I successfully able to download the obb on the device from google play

  7. So, when I run my apk on my device, it dowloads the obb.

  8. Now, the problem is I cannot load any of the scenes from my .obb . Even the levelcount returns 1

here is the code I am using to load the .obb and then load the scene

string nextScene= "StartingLevel"; //some other scene in my asset bundle
string uri = "file://" + mainPath;
WWW www = WWW.LoadFromCacheOrDownload(uri , 1); //this is correct as my obb is getting downloaded successfully
yield return www;
if (www.error != null)
{
    log ("wwww error " + www.error);
}
else
{
	log (" tried loading level at "+Time.time);
	log (Time.time+" cur level name is "+Application.loadedLevelName
				+" number of levels is "+Application.levelCount);
	Application.LoadLevel(nextScene);
}

So, could you please tell how I can load my scenes that are there in the .obb?

Hi guys,

I solved this problem myself. If anyone else is looking for the same, here is a tutorial I wrote