Does anyone have any example code of using this? I am getting a bad unity3d file out of this. It is smaller and the plugin says “Unable to launch Unity Player”
Have you checked out this example project?
http://unity3d.com/support/resources/example-projects/assetbundles
Actually we have better results and more experience with the bundles. It is building the web player that is causing problems. The file isn’t the same size as when I build it via the traditional editor menus. Also, it doesn’t work.
string[ ] levels = new string[3];
levels[0] = “Loading”;
levels[1] = “Looks”;
BuildPipeline.BuildPlayer(levels, buildFile, BuildTarget.WebPlayerStreamed, BuildOptions.CompressTextures );
Well I’m going to reply to my own post here. Once I removed the BuildOptions.BuildAdditionalStreamedScenes option and added BuildOptions.CompressTextures it works fine. The documentation is a little light on those options. Anyone know what BuildOptions.BuildAdditionalStreamedScenes does?
BuildAdditionalStreamedScenes is used if you want stream additional levels using the WWW class after the first unity3d file is already loaded. Those files contain no script dll’s, jut asset data and a specific level.
See the AssetBundle example project on an example how to use it:
http://unity3d.com/support/resources/example-projects/assetbundles