building assetbundle with scene and entire assets of that scene

Hi All,
I want to develop one application that will contain 5 icon buttons of 5 mini games. 5 mini games should have different assetbundles stored onto the server with entire project scenes and resources. If I clicked on any icon from my application it should load all data from assetbundles to android or ios device and user should start playing the game.

Is it Possible ??

I have tried in web player exporting in following manner

var levels : String = [“Assets/MainMenu.unity”,
“Assets/BlasterIngameArcade.unity”,
“Assets/BlasterIngamePuzzle.unity”];

var path = EditorUtility.SaveFilePanel ("Save Resource", "", "MyProject", "unity3d");

if (path.Length != 0)
{
   BuildPipeline.BuildStreamedSceneAssetBundle( levels,path, BuildTarget.WebPlayer);
}

and loading in following manner

var download = WWW.LoadFromCacheOrDownload ("https://dl.dropboxusercontent.com/u/225593044/MyProject.unity3d", 1);
	yield return  download;
	
	AssetBundle bundle1 = download.assetBundle;
	
	bundle1.LoadAll();
	Application.LoadLevel ("BlasterIngameArcade");	

But The reference scripts attached with the gameobjects in scene are missing. It only shows assets in scene i.e material and textures

Thanks
Nilesh

1 Answer

1

Hi @nilesh410451 I know this is an old question, but did you ever find a solution?

I’m currently trying to achieve the same thing; load scenes with everything included in it, especially scripts!