"Scene couldn't be loaded because it isn't added to the build settings" but it is?


To get the scene to change after clicking “Start” in-game

What Happens:

I get the following error:

Scene '' (-1) couldn't be loaded because it has not been added to the build settings or the AssetBundle has not been loaded.
To add a scene to the build settings use the menu File->Build Settings...

Which is strange, because I did configure my build settings.

Here’s what my code looks like:

using UnityEngine;
using System.Collections;

public class LevelManager : MonoBehaviour {

	public void LoadLevel (string name){
		Debug.Log("Level load requested for: "+name);

	public void QuitLevel ()
		Debug.Log ("I want to quit!");


What’s causing this error? Thanks in advance!!

Scene ’ ’ (-1) → The string is obviously empty, the compiler is looking for a scene called ‘’, hence you get the error. Go to the part of the code where you call LoadLevel(string name) and check the parameter.