- Home /
 
 
               Question by 
               yunniity · Jun 24, 2020 at 05:01 PM · 
                assetbundlebuild settings  
              
 
              AssetBundle has not been loaded
I am getting this error message as fast as i am trying to swap scenes: Scebe '0' couldn't be loaded because it has not been added to the build settings or the AssetBundle has not been loaded. I am sure my build settings are alright but i am not so sure about the AssetBundle part. Here is the code which loads the scenes:
using System.Collections; using System.Collections.Generic; using System.Security.Cryptography; using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement; public class GameOver : MonoBehaviour{ static public float BlueScore = 0f; static public float RedScore = 0f; private float WhichScene; public GameObject Player1; public GameObject Player2; public Text P1Score; public Text P2Score; void Start() {
 }
 void Update()
 {
   
     if (Player1.transform.position.y < -3f)
     {
         BlueScore = BlueScore + 1f;
         P2Score.text = BlueScore.ToString();
         LoadNextLevel();
     }
     if (Player2.transform.position.y < -3f)
     {
         RedScore = RedScore + 1f;
         P1Score.text = RedScore.ToString();
         LoadNextLevel();
     }
 }
 public void LoadNextLevel()
 {
     WhichScene = Random.Range(0, 1);
     SceneManager.LoadScene(WhichScene.ToString());
     
 }
 
               }
               Comment
              
 
               
              Your answer