- Home /
BuildPipeline.BuildPlayer - Download scenes without adding them to build menu
Hi,
I am building a game with 10 levels. I would like to include the first 2 in the downloaded app but the rest are downloaded as asset bundles.
However if I don't include them in the build, I get this error:
"Level 'MyLevel3' (-1) couldn't be loaded because it has not been added to the build settings. To add a level to the build settings use the menu File->Build Settings..."
How can I do this please? Thanks.
Answer by rrh · Dec 04, 2013 at 09:24 PM
Look up BuildPipeline.BuildStreamedSceneAssetBundle and editor code. That example code if you put it in the Assets/Editor folder will add a menu item that will build scene asset bundles that aren't in the main file. Note its build target is the web player, you'll have to change that if yours is a downloaded app.
Your answer
Follow this Question
Related Questions
Load and run scene in background 1 Answer
Object parent Asset Bundle 1 Answer
How to load levels with animation GUI 1 Answer
LoadLevelAsync Causes Unity to Crash? 1 Answer
Why does U4 hang when trying to load an Asset Bundle scene? 0 Answers