title: Unity5 Building Asset Bundles with scenes
body: <p>I am trying to create an asset bundle with scenes. This is what I did in unity4</p>
  
  <pre><code>[MenuItem("Bundle/Create ios Scene SceneLoader")]
  static void iosBuild(){
      string[] levels = new string []{"Assets/Scenes/01 SceneLoader.unity", "Assets/Scenes/02 Level1.unity","Assets/Scenes/02 Level2.unity" ,"Assets/Scenes/02 Level3.unity"};
  
      BuildPipeline.BuildStreamedSceneAssetBundle( levels, "Assets/Bundles/bundle-ios.unity3d", BuildTarget.iOS); 
  }
  </code></pre>
  
  <p>After that I load my bundle via this code:</p>
  
  <pre><code>using(WWW www = WWW.LoadFromCacheOrDownload (url, 0)){
          while(!www.isDone){
              status.text = "loading \n" + (www.progress * 100).ToString() + "%";
              yield return null;
          }
  
          yield return www;
          //check if server response is an error
          if (www.error != null){
              throw new Exception("WWW download had an error: " + url + " " + www.error);
          }
  
          //Load the asset bundle
          AssetBundle bundle = www.assetBundle;
  
          //obsolete bundle.LoadAll();
          bundle.LoadAllAssets();
          Application.LoadLevel ("01 SceneLoader");
      } 
  </code></pre>
  
  <p>This code worked in unity4, but now, when I load my Scene, all the script references are missing. Objects are in the scene but no scripts. Also, unity tells me that BuildStreamedSceneAssetBundle is obsolete. So my question is, why aren't my script references in the core scene ? So that when I load an asset bundle, all the scripts aren't missing. Also my NGUI Atlas that I use in the loaded scene is missing.</p>
  
  <p>Would be glad if someone has an idea!</p>
  
  <p>EDIT: the first string in "levels" will have all script references. How is that possible ?</p>